This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Transformation into XSL:FO
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] Transformation into XSL:FO
- From: tcn at melvaig dot co dot uk (Trevor Nash)
- Date: Fri, 18 May 2001 12:57:25 GMT
- Organization: Melvaig Software Engineering Limited
- References: <903A7281CDB7D4118A5000500450BB081D568D@samoa.sitewaerts>
- Reply-To: xsl-list at lists dot mulberrytech dot com
>I want to transform a XML source document into a XSL:FO Stylesheet via a XSL
>transformation.
>
Rather than give you an answer on a plate, I will tell you where to
look. Better for the soul ;-)
Read up on xsl:namespace-alias. The objective is to allow you to
write your input stylesheet like this:
<xsl:template name="insertheader">
<oxsl:template match="object[@type='page']">
<fo:block break-before="page">
<fo:block><oxsl:value-of
select="property[@name='name']"/></fo:block>
<fo:block color="white">.</fo:block>
</fo:block>
</oxsl:template>
</xsl:template>
Note the prefix 'oxsl' on XSL elements which are to be placed in the
output stylesheet. This needs to be declared as a fictitious
namespace in the input stylesheet. The namespace-alias instruction
causes the ouput to declare the XSL namespace instead.
When you check the output, remember that the prefix can be anything:
its the namespace URI that matters.
Trevor Nash
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list