|
Subject: RE: [xsl] Namespace problem, part two From: "Trevor Nicholls" <trevor@xxxxxxxxxxxxxxxxxx> Date: Sat, 26 Sep 2009 02:43:22 +1200 |
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@xxxxxxxxx]
Sent: Saturday, 26 September 2009 2:29 a.m.
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
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 didnbt 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 naC/ve tool; that
would result in this behavior. Or is there a Xalan extension being used
to split the files, which you didnbt show in your sample?
~Chris
--
Chris Maden, text nerd <URL: http://crism.maden.org/ >
bWhat a dream life would seem if you could see the world from
inside an Etch-A-Sketch.b b Andrew Bird, bTea & Thorazineb
GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Namespace problem, part t, Christopher R. Maden | Thread | [xsl] Help XSL Transformation of Da, Rajesh Jain |
| Re: [xsl] Namespace problem, part t, Christopher R. Maden | Date | Re: [xsl] Use of xsl:apply-template, ac |
| Month |