[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: "Axel Kesten" <kesten@xxxxxxxxxxxxxxx>
Date: Wed, 7 Dec 2005 17:23:33 +0100
doctype system xsl
Hi David

thank you for the hint.
I've done as you mentioned (not exactly) but now i have another problem.

Now i have all the attributes of the xsl:stylesheet element as attributes of
my top-level element in the destination xml-file.

The stylesheet now looks like this:
<xsl:template match="/">

<xsl:choose>

    <xsl:when test="/C/D/E[position()=1]">

        <A>

        <xsl:for-each select="/C/D/E">

            <xsl:variable name="doc_name" select="."></xsl:variable>

            <xsl:apply-templates
select="document($doc_name)"></xsl:apply-templates>

        </xsl:for-each>

        </A>

    </xsl:when>

    <xsl:otherwise>

        <xsl:variable name="nodename" select="A/CATEGORY"></xsl:variable>

        <xsl:choose>

            <xsl:when test="$nodename='test'">

                <xsl:call-template name="copy"></xsl:call-template>

            </xsl:when>

        </xsl:choose>

    </xsl:otherwise>

</xsl:choose>

</xsl:template>


<xsl:template name="Kopie">

<xsl:copy-of
select="MSRSW/SW-SYSTEMS/SW-SYSTEM/SW-COMPONENT-SPEC/*"></xsl:copy-of>

</xsl:template>

</xsl:stylesheet>

The elements stylesheet and output i have not touched, except of the
doctype-system.

Is it a problem that i have my top-level element <A> not as first statement
in the root template?

Kind regards

Axel

----- Original Message -----
From: "David Carlisle" <davidc@xxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Wednesday, December 07, 2005 2:31 PM
Subject: Re:  Problem with doctype-system in transformation xml to xml


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

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.