Home arrow XML arrow Page 5 - One-One, One-Many and Many-Many Relations in XML Schema

One-One, One-Many and Many-Many Relations in XML Schema - Implementing a “One-Many” relation in XML Schema: a sample XML document
(Page 5 of 6 )

In the previous section, I defined an XML Schema to enforce a simple relation in between two element hierarchies.  The following would be an XML document sample for the previously defined XML Schema.

<?xml version="1.0" encoding="UTF-8"?>
<Organization xmlns:xsi="http://www.w3.org/2001/XMLSchema-
" xsi:noNamespaceSchemaLocation="C:\Documents and
            <Loc>New York</Loc>

The above XML document is error free, as the values in the “deptno” element of “Employee” exist in the “deptno” element of “dept.”  Try changing “20” (in “Employee”) to “30” (which does not exist in “dept”).  The XML document becomes invalid during parsing!

blog comments powered by Disqus

- Open XML Finally Supported by MS Office
- XML Features Added to Two Systems
- Using Regions with XSL Formatting Objects
- Using XSL Formatting Objects
- More Schematron Features
- Schematron Patterns and Validation
- Using Schematron
- Datatypes and More in RELAX NG
- Providing Options in RELAX NG
- An Introduction to RELAX NG
- Path, Predicates, and XQuery
- Using Predicates with XQuery
- Navigating Input Documents Using Paths
- XML Basics
- Introduction to XPath

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials