[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Using XSLT on a Schema

Subject: Using XSLT on a Schema
From: Simon Cansick <SC@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 18 Jun 2002 11:43:47 +0100
using xmlns dt namespace xslt
I cannot seem to get an XSLT working on an XML Schema.  When debugging the
transaformation, it never seems to find the Schema or ElementType nodes, is
this due to the namespace declarations in the XSLT file?  Can anyone tell me
how I can transform this schema?

I have prepared a simple example of the problem I get.

XML Schema -

<?xml version="1.0"?>
<Schema name="xmlSchemaSalesOrder"
xmlns="urn:schemas-microsoft-com:xml-data"
xmlns:dt="urn:schemas-microsoft-com:datatypes">
	<ElementType model="open" name="SALESORDER" content="eltOnly"
order="seq">
		<description>some description</description>
		<element maxOccurs="1" minOccurs="1" type="ACCOUNTCODE"/>
	</ElementType>

	<ElementType name="ACCOUNTCODE" content="textOnly" dt:type="string">
		<description>some more description</description>
	</ElementType>
</Schema>


XSLT -
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/">
		<html>
			<xsl:apply-templates select="/Schema"/>
		</html>
	</xsl:template>
	<xsl:template match="Schema">
		<TABLE border="0" cellspacing="1" width="95%">
			<tr><td><xsl:value-of select="@name"/></td></tr>
			<xsl:apply-templates select="ElementType"/>
		</TABLE>
	</xsl:template>
	<xsl:template match="ElementType">
		<tr>
			<td><xsl:value-of select="description"/></td>
		</tr>
	</xsl:template>
</xsl:stylesheet>

The result I get is - <html></html>

I am using MSXML3.


Thanks for any help,

Simon Cansick

Access Accounting Ltd
---------------------------------------------------------------
The Old School, Stratford St Mary,
Colchester, Essex. CO7 6LZ, United Kingdom.
Phone     +44 (0) 1206 322575
Fax       +44 (0) 1206 322956
Internet  http://www.access-accounts.com
          http://www.accessweb.co.uk
---------------------------------------------------------------
Access Accounts - The Brand Leader in e-commerce financials

This message, including any associated files, is confidential; its contents
do not constitute a commitment by Access Accounting Ltd except where
provided for in a written agreement between you and Access Accounting Ltd.
Any opinions expressed within this email are those of the author and are not
necessarily endorsed by Access Accounting Ltd.

Any unauthorised disclosure, use or dissemination, either whole or partial,
is prohibited.
If you are not the intended recipient of the message, please notify the
sender immediately.



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.