[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: andrew welch <andrew.j.welch@xxxxxxxxx>
Date: Wed, 7 Dec 2005 12:04:36 +0000
doctype system xml
On 12/7/05, Axel Kesten <kesten@xxxxxxxxxxxxxxx> 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

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.