Subject: Re: [xsl] XML schema namespace question (Cancelled) From: "Mark Wilson" <mark@xxxxxxxxxxxx> Date: Tue, 10 Mar 2009 13:47:37 -0700 |
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: [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>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XML schema namespace question, Mark Wilson | Thread | [xsl] include multiple utility modu, frank johnson |
[xsl] XML schema namespace question, Mark Wilson | Date | [xsl] include multiple utility modu, frank johnson |
Month |