Hi Chris
This part of the stylesheet picks up everything within an <included> node and
uses a Xalan extension (xalan:write) to redirect it to a file whose name is an
attribute of the <included> element:
<xsl:template match="included" priority="2">
<xsl:variable name="file" select="@srcfile" />
<!--include srcfile="{$file}" /-->
<xsl:element name="include">
<xsl:attribute name="srcfile">
<xsl:value-of select="$file"/>
</xsl:attribute>
</xsl:element>
<!-- separate XML file for the included content -->
<xalan:write select="$file">
<xsl:apply-templates />
</xalan:write>
</xsl:template>
Cheers
Trevor
-----Original Message-----
From: Christopher R. Maden [mailto:crism(_at_)maden(_dot_)org]
Sent: Saturday, 26 September 2009 2:29 a.m.
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Namespace problem, part two
Trevor Nicholls wrote:
The namespace declaration in <xsl:element..> certainly does have some
effect: if I take it out then none of the output documents are valid, with
it there at least the first document is.
What I didn’t see in your sample stylesheet is how the files are split.
One theory that occurs to me is that a single namespace-valid document
is being created, and then being split by some more naïve tool; that
would result in this behavior. Or is there a Xalan extension being used
to split the files, which you didn’t show in your sample?
~Chris
--
Chris Maden, text nerd <URL: http://crism.maden.org/ >
“What a dream life would seem if you could see the world from
inside an Etch-A-Sketch.” — Andrew Bird, “Tea & Thorazine”
GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--