Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] DOCTYPE + XSLT + Xalan + FO

From: "Ganesh Babu Nallamothu, Integra-India" <ganeshbabu.nallamothu@----------------->
To:
Date: 11/1/2004 7:57:00 AM
Dear All,

I am giving XML, XSL and FO output. Actually all the rules of FO has to be
applied to the FO output. But it is not happening. Can any body let me know
what is the reason behind this. If the <!DOCTYPE> line is commented/ instead
of <xsl:template match="content"> if we use   <xsl:template match="/"> then
only the rules are applied. But I want along with DOCTYPE as my entities are
in separate set of files. If we use "/" also the rules are not applying for
other templates.

Please help me. Here are my code samples.

XML
====

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE content SYSTEM "content.dtd">
<content xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:fo="http://www.w3.org/1999/XSL/Format" id="pie-c01-000-001">
<piece role="chapter">
<heading>Banking on panic <span role="subtitle">The historical record and a
theoretical frame</span></heading>
</piece>
</content>

----------------------------------------------------------------------------
----------------------------------------------------------
XSL
===

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
                version="1.0">

  <xsl:output method="xml" indent="yes"/>

  <xsl:template match="content">
    <fo:root>
      <fo:layout-master-set>
        <fo:simple-page-master master-name="simple" page-height="29cm"
page-width="21cm" margin-top="1.5cm" margin-bottom="1.5cm" margin-left="2cm"
margin-right="2cm">
          <fo:region-body margin-top="1.5cm"/>
          <fo:region-before extent="1.5cm"/>
          <fo:region-after extent="1.5cm"/>
        </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="simple">
        <fo:static-content flow-name="xsl-region-after">
          <fo:block text-align="end">
            p. <fo:page-number/>
          </fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
          <fo:block>
            <xsl:apply-templates/>
          </fo:block>
        </fo:flow>
      </fo:page-sequence>
    </fo:root>
  </xsl:template>

  <xsl:template match="piece/heading">
    <fo:block font-size="18pt" text-align="center" font-weight="bold"
space-after="0.5cm">
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
</xsl:stylesheet>

----------------------------------------------------------------------------
-----------------------------------------------------------------
FO

<?xml version="1.0" encoding="UTF-8"?>
Banking on panic The historical record and a theoretical frame

-------------------------------------------------------------
Regards,
Ganesh


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent