Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > identify transform using XSL:FO rather than XSLT

Thread Tools

identify transform using XSL:FO rather than XSLT

chr158ooth chr158ooth is offline
Junior Member
Join Date: Sep 2011
Posts: 2

I have an XSL I use for identifying the XML - e.g. takes the XML and transforms it into another XML. This works as expected when it's XSLT.
However I need to make this work in the same work but using XSL:FO so that it can be made pretty for print and outputted as a PDF.

I am sure this should be simple, and I am missing something obvious.

Any help would be much appreciated,

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlnssl="" xmlns:fo="">
<xslutput method="xml" version="1.0" omit-xml-declaration="yes" indent="yes"/>

<xsl:template match="/">
<fo:root font-size="9pt" xmlns:fo="">
<fo:simple-page-master master-name="all" page-height="279.4mm" page-width="215.9mm" margin-top="5mm" margin-bottom="5mm" margin-left="5mm" margin-right="5mm">
<fo:region-body margin-top="40mm" margin-bottom="45mm"/>
<fo:region-before extent="40mm"/>
<fo:region-after extent="45mm"/>

<foage-sequence-master master-name="pagesequences" initial-page-number="1" force-page-count="no-force">
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="all"/>
<fo:conditional-page-master-reference odd-or-even="even" master-reference="all"/>

<foage-sequence master-reference="pagesequences">
<fo:static-content id="page1-static-before" flow-name="xsl-region-before">
<fo:table-column column-width="200mm"/>
<fo:table-row text-align="center">
This is a copy the generated XML

<fo:flow flow-name="xsl-region-body" color="black">
<xsl:apply-templates select="/ | node()"/>


<xsl:template match="/ | node()">
<xsl:apply-templates select="@* | node()"/>

<xsl:template match="@*">
<xsl:element name="attribute">
<xsl:attribute name="name">
<xsl:value-of select="local-name()"/>
<xsl:value-of select="."/>


<?xml version="1.0" encoding="UTF-8"?>
<test>This is test</test>
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can XSLT render the content: &lt;p&gt as html <p> rather than text? mark4asp XML 8 03-17-2008 11:54 AM
maps to hold ultra large data sets using customer allocators to allocate disk space rather than main memory CMOS C++ 15 05-17-2007 10:12 PM
blocking I/O with javax.xml.parsers.DocumentBuilder.parse() and javax.xml.transform.Transformer.transform() Java 1 03-27-2005 06:56 AM
Using Src Rather Than CodeBehind in Web User Controls Nehal Shah ASP .Net 6 11-14-2003 01:31 AM
Problems retrieving items from a list using a reference rather than an integer - can you help? Rogue9 Python 9 07-18-2003 07:13 AM