|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Problem with doctype-system in transformation xml
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.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








