[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XML schema namespace question (Cancelled)

Subject: Re: XML schema namespace question (Cancelled)
From: "Mark Wilson" <mark@xxxxxxxxxxxx>
Date: Tue, 10 Mar 2009 13:47:37 -0700
Re:  XML schema namespace question (Cancelled)
I found the info I needed. Thanks anyway.
Mark

--------------------------------------------------
From: "Mark Wilson" <mark@xxxxxxxxxxxx>
Sent: Tuesday, March 10, 2009 12:37 PM
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject:  XML schema namespace question

As Michael Kay suggested, I am trying to my my XSLT schema aware. However, I am somewhat confused about how namespaces are identifies and placed in schemas and how that relates to instances. Take the simple schema in Listing 1 and an instance of it in Listing 2. Consider a namespace prefix of "ko" and a locator of "www.knihtisk.org". I think I understand (but am not sure) how it is presented in the instance (see listing 2) , but do not know how the namespace is related to (presented in) the schema.

Any help appreciated,
Mark


Listing 1. <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="WapperAroundAllButGlobals">
   <xs:complexType>
       <xs:sequence>
           <xs:element name="One" type="xs:string"/>
           <xs:element ref="Global"/>
       </xs:sequence>
   </xs:complexType>
</xs:element>

   <xs:element name="Global">
   <xs:complexType>
       <xs:sequence>
           <xs:element name="Two" type="xs:string"/>
           <xs:element name="Three" type="xs:string"/>
       </xs:sequence>
   </xs:complexType>
   </xs:element>

</xs:schema>

Listing 2
<?xml version="1.0" encoding="UTF-8"?>

<WapperAroundAllButGlobals xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ko=http:/www.knihtisk.org>
<One>stuff</One>
<Global>
<Two>more stuff</Two>
<Three>yet even more stuff</Three>
</Global>
</WapperAroundAllButGlobals>

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.