Hi Andrew
below i've inserted the stylesheet.
Maybe, it's not very efficient, but I'm not so experienced in XSL.
Because of the structure of the xml-files i'm evaluating, the </A> is
written to the output tree after the <A>.
The stylesheet is not so long. I have copied it completely into the posting,
because i didn't know what to delete.
Kind regards
Axel
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:xdt="http://www.w3.org/2005/xpath-datatypes">
<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" />
<xsl:template match="/">
<xsl:variable name="knotenname" select="A/CATEGORY"></xsl:variable>
<xsl:choose>
<xsl:when test="$nodename='test'">
<!-- node from the called files, defined in the config-file-->
<xsl:call-template name="Copy"></xsl:call-template>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
<xsl:for-each select="/C/D/E">
<!-- nodes from the config-file -->
<xsl:variable name="first" select="position()"></xsl:variable>
<xsl:choose>
<xsl:when test="$first=1">
<xsl:call-template name="head"></xsl:call-template>
</xsl:when>
</xsl:choose>
<xsl:variable name="doc_name" select="."></xsl:variable>
<xsl:apply-templates select="document($doc_name)"></xsl:apply-templates>
<!-- opening a file form the list in the config-file -->
<xsl:if test="$first=last()">
<xsl:text disable-output-escaping="yes"></A></xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template name="head">
<xsl:text disable-output-escaping="yes"><A></xsl:text>
</xsl:template>
<xsl:template name="Copy">
<xsl:copy-of select="A/F/G/H/*"></xsl:copy-of>
<!-- other nodes in the opened file -->
</xsl:template>
</xsl:stylesheet>
----- Original Message -----
From: "andrew welch" <andrew(_dot_)j(_dot_)welch(_at_)gmail(_dot_)com>
On 12/7/05, Axel Kesten <kesten(_at_)realtime-doc(_dot_)de> wrote:
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-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>
--~--