[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Question about XSLTC

Subject: Question about XSLTC
From: "Ben Rainville" <brainville@xxxxxxxxxxx>
Date: Mon, 6 Aug 2007 14:07:09 -0700
 Question about XSLTC
Hello,

I am working on application where we convert Word documents to PDFs.  To
do this, we take the XML describing the Word document, transform it into
FO using XSL, and then render the FO using RenderX's XEP.  Until
recently, this was working just fine.

Recently we have decided to switch to using XSLTC, to improve the speed
of our transforms.  In other parts of our application, we have been able
to use XSLTC without a problem.  However in the part that generates PDFs
from Word docs, I have run into a problem.  With our old transformer
factory, transforming a document would produce, for example:

<fo:block widows="2" orphans="2" font-size="10pt" line-height="1.147"
white-space-collapse="false">
        <fo:marker xmlns:svg="http://www.w3.org/2000/svg"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
marker-class-name="first-page-header" />
        <fo:marker xmlns:svg="http://www.w3.org/2000/svg"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
marker-class-name="first-page-footer" />
        <fo:marker xmlns:svg="http://www.w3.org/2000/svg"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
marker-class-name="odd-page-header" />
        <fo:marker xmlns:svg="http://www.w3.org/2000/svg"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
marker-class-name="odd-page-footer" />
        <fo:marker xmlns:svg="http://www.w3.org/2000/svg"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
marker-class-name="even-page-header" />
        <fo:marker xmlns:svg="http://www.w3.org/2000/svg"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
marker-class-name="even-page-footer" />
        <fo:block xmlns:svg="http://www.w3.org/2000/svg"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags" text-align="left"
font-family="TimesNewRoman" font-size="12pt" language="EN-US">
          <fo:inline>
            <fo:leader leader-length="0pt" />
            Some content
          </fo:inline>
        </fo:block>
      </fo:block>

Using the new transformer factory
(org.apache.xalan.xsltc.trax.TransformerFactoryImpl), I get the
following:

<fo:block widows="2" orphans="2" font-size="10pt" line-height="1.147"
white-space-collapse="false">
        <fo:marker xmlns:svg="http://www.w3.org/2000/svg"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
marker-class-name="first-page-header" />
        <fo:marker xmlns:svg="http://www.w3.org/2000/svg"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
marker-class-name="first-page-footer" />
        <fo:marker xmlns:svg="http://www.w3.org/2000/svg"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
marker-class-name="odd-page-header" />
        <fo:marker xmlns:svg="http://www.w3.org/2000/svg"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
marker-class-name="odd-page-footer" />
        <fo:marker xmlns:svg="http://www.w3.org/2000/svg"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
marker-class-name="even-page-header" />
        <fo:marker xmlns:svg="http://www.w3.org/2000/svg"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
marker-class-name="even-page-footer" />
        <block xmlns:svg="http://www.w3.org/2000/svg"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags" text-align="left"
font-family="TimesNewRoman" font-size="12pt" language="EN-US">
          <inline>
            <leader leader-length="0pt" />
            Some content
          </inline>
        </block>
      </fo:block>

As you can see, it appears that there is some kind of a namespace
problem for the fo:block that is inside of another fo:block.  Has anyone
seen an issue similar to this?  I can post the XML and XSL if it would
help.

Thanks in advance,

Ben Rainville

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.