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