xsl-list
[Top] [All Lists]

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

2005-12-07 05:04:36
On 12/7/05, Axel Kesten <kesten(_at_)realtime-doc(_dot_)de> wrote:
Hi all,

my problem is:

I have written a stylesheet to transform a list of xml-files, given in =
an xml-config-file, to another xml-file with another structure and dtd.
Anything works fine, except of the dtd-declaration in the destination =
xml-file.
I use  <xsl:output  method="xml" version="1.0" encoding="UTF-8" indent="yes"
omit-xml-declaration="no" doctype-system="C:\A.dtd" media-type="text/xml" />

 to create the dtd-declaration.
In the A.dtd the first element is A, but the result in the destination =
xml-file is as follows:
<!DOCTYPE B SYSTEM "C:\A.dtd">

and B is exactly the second element in the destination xml-file and it =
is the only element, defined in the A.dtd as content for A.

Of course this xml-file is not valid. If i change manually to <!DOCTYPE =
A SYSTEM "C:\A.dtd"> it's valid. That means, all the other code should =
be OK.

What is the problem? Can anybody give me a hint what I'm doing wrong?

I'm using XML-Version 1.0, XSL 2.0 and altovaxml-processor 2006 (with =
Altova XSLT 2.0 Engine) to create the output file.

For this to happen <B> must be the root element of your output, eg:

<xsl:template match="/">
  <B>
    ...

You need to post a small complete example stylesheet that causes this
problem so it can be recreated, eg

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<xsl:output omit-xml-declaration="no" doctype-system="C:\A.dtd"/>

<xsl:template match="/">
  <B></B>
</xsl:template>

</xsl:stylesheet>

cheers
andrew

--~------------------------------------------------------------------
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>
--~--