Subject: Re: [xsl] Problem reading root element in XML Stylesheet based XML document From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Fri, 31 Jan 2003 12:42:49 -0500 |
Cheers, Wendell
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.
Is there any special configuration that I need for the transformer to recognize the top-level element? or is there a syntax change that I need to make to the XSL file? I am including the top portions of the XML and XSL files here...if the XSL file recognizes the root element, then I should get the display text. This is successful if I use the DTD based file, rather than the schema based file. Any ideas?
XML - <?xml version="1.0" encoding="UTF-8"?> <Order xmlns="publicid:org.xCBL:schemas/XCBL35/Order.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="publicid:org.xCBL:schemas/XCBL35/Order.xsd D:\temp\OrderDIP_v2.3.xsd"> <OrderHeader> <OrderNumber> <BuyerOrderNumber>35353535</BuyerOrderNumber> </OrderNumber> <OrderIssueDate>20030123T01:00:00</OrderIssueDate> ... </OrderHeader> </Order>
XSL - <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text"/>
<xsl:template match="Order"> <xsl:text>Print this text if the root element is matched</xsl:text> </xsl:template> ... </xsl:stylesheet>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Problem reading root elem, David Carlisle | Thread | Re: [xsl] Problem reading root elem, Francis Norton |
RE: [xsl] Selecting an Attribute Ba, Siva Jasthi | Date | Re: [xsl] Problem reading root elem, Francis Norton |
Month |