[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Problem reading root element in XML Stylesheet bas
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|