[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
At 6:06 PM -0500 1/31/03, Chris Libby wrote:
The problem is not what you think it is. You're trying to match an Order element in no namespace. You need to match an Order element in the publicid:org.xCBL:schemas/XCBL35/Order.xsd namespace.
For example,
<xsl:template xmlns:cd="publicid:org.xCBL:schemas/XCBL35/Order.xsd" match="cd:Order">
<xsl:text>Print this text if the root element is matched</xsl:text>
</xsl:template>
(You should also use a real URL as a namespace URI. The publicid scheme is not registered with the IANA. )
--
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Re: [xsl] Problem reading root element in XML Stylesheet based XML document
Subject: Re: [xsl] Problem reading root element in XML Stylesheet based XML document From: Elliotte Rusty Harold <elharo@xxxxxxxxxxxxxxx> Date: Fri, 31 Jan 2003 13:29:08 -0500 |
At 6:06 PM -0500 1/31/03, Chris Libby wrote:
I am having a problem reading the root element when performing an XSL Transformation on an XML file that is based on an XML Schema. The transformation is successful, however, if I base the XML document on a DTD file instead.
The problem is not what you think it is. You're trying to match an Order element in no namespace. You need to match an Order element in the publicid:org.xCBL:schemas/XCBL35/Order.xsd namespace.
For example,
<xsl:template xmlns:cd="publicid:org.xCBL:schemas/XCBL35/Order.xsd" match="cd:Order">
<xsl:text>Print this text if the root element is matched</xsl:text>
</xsl:template>
(You should also use a real URL as a namespace URI. The publicid scheme is not registered with the IANA. )
--
+-----------------------+------------------------+-------------------+ | Elliotte Rusty Harold | elharo@xxxxxxxxxxxxxxx | Writer/Programmer | +-----------------------+------------------------+-------------------+ | Processing XML with Java (Addison-Wesley, 2002) | | http://www.cafeconleche.org/books/xmljava | | http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA | +----------------------------------+---------------------------------+ | Read Cafe au Lait for Java News: http://www.cafeaulait.org/ | | Read Cafe con Leche for XML News: http://www.cafeconleche.org/ | +----------------------------------+---------------------------------+
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Problem reading root elem, Francis Norton | Thread | [xsl] Date Formating, Arthur |
Re: [xsl] operator in xsl, David Carlisle | Date | RE: [xsl] N : M transformation, Michael Kay |
Month |