xsl-list
[Top] [All Lists]

Re: Problem with doctype-system in transformation xml to xml

2005-12-07 06:31:16

  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
________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--