Re: [xsl] Transformation into XSL:FO

Subject: Re: [xsl] Transformation into XSL:FO
From: tcn@xxxxxxxxxxxxx (Trevor Nash)
Date: Fri, 18 May 2001 12:57:25 GMT
>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


Current Thread