xsl-list
[Top] [All Lists]

Re: [xsl] XML schema namespace question (Cancelled)

2009-03-10 16:50:58
I found the info I needed. Thanks anyway.
Mark

--------------------------------------------------
From: "Mark Wilson" <mark(_at_)knihtisk(_dot_)org>
Sent: Tuesday, March 10, 2009 12:37 PM
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject: [xsl] 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>

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>