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

Re: Problem with doctype-system in transformation xml

Subject: Re: Problem with doctype-system in transformation xml to xml
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 7 Dec 2005 13:31:16 GMT
xslt2 doctype
  Because of the structure of the xml-files i'm evaluating, the </A> is
  written to the output tree after the <A>.

that is your problem, you have not generated an A element just written
some text that looks like <A> so as far as XSLT is concerned your top
level generated element is B.

Don't use disable-output-escaping unless you _really_ know that you are
in some special circumstance where it is needed. The feature is
deprecated in XSLT2, with good reason.

Also,  doctype-system="C:\A.dtd" should be a URI and there isn't a C:
URI scheme. that should be  doctype-system="file:///C:/A.dtd" some XML
parsers may silently accept the windows fiel path and find a DTD
specified a c:\... but not all will, and arguably those that do are in
error.

You want youer top level template matching / to make an A element so
just do that:
<xsl:template match="/">
<A>
...
</A>
</xsl:template>



and get rid of 


<xsl:template name="head">

<xsl:text disable-output-escaping="yes">&lt;A&gt;</xsl:text>

</xsl:template>



David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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.