Loading ...
Sorry, an error occurred while loading the content.

2549Trouble with XSL in FO only - keys? external doc? not sure what the problem is...

Expand Messages
  • Dahlquist_Michael/shure@shure.com
    Dec 2, 2002
    • 0 Attachment
      Hi -

      This may well be an XSL problem, but it only shows itself when I
      transform FO to PDF. I'm using Cocoon for all my transformations. Going
      to XML or HTML works fine; to PDF, including the following text
      produces no PDF file, and the error "FOPException: root must be root
      element."

      I've stripped both HTML and PDF output down to find the problem, but so
      far I haven't been successful. This is the XSL for HTML output:

      <xsl:template match="ACCESSORIES">
      <p class="subhead">ACCESSORIES</p>
      <xsl:apply-templates select="$partLookupDoc"/>
      <xsl:if test="FURNISHED">
      <p class="spec_head">FURNISHED</p>
      <p class="spec"><xsl:apply-templates/></p>
      </xsl:if>
      <xsl:if test="REPLACEMENT">
      <p class="spec_head">REPLACEMENT</p>
      <p class="spec"><xsl:apply-templates/></p>
      </xsl:if>
      <xsl:if test="OPTIONAL">
      <p class="spec_head">OPTIONAL</p>
      <p class="spec"><xsl:apply-templates/></p>
      </xsl:if>
      </xsl:template>

      ...and this is for PDF output:

      <xsl:template match="ACCESSORIES">
      <fo:block xsl:use-attribute-sets="subhead">ACCESSORIES</fo:block>
      <xsl:apply-templates select="$partLookupDoc"/>
      <xsl:if test="FURNISHED">
      <fo:block
      xsl:use-attribute-sets="spec_head">FURNISHED</fo:block>
      <fo:block
      xsl:use-attribute-sets="spec"><xsl:apply-templates/></fo:block>
      </xsl:if>
      <xsl:if test="REPLACEMENT">
      <fo:block
      xsl:use-attribute-sets="spec_head">REPLACEMENT</fo:block>
      <fo:block
      xsl:use-attribute-sets="spec"><xsl:apply-templates/></fo:block>
      </xsl:if>
      <xsl:if test="OPTIONAL">
      <fo:block
      xsl:use-attribute-sets="spec_head">OPTIONAL</fo:block>
      <fo:block
      xsl:use-attribute-sets="spec"><xsl:apply-templates/></fo:block>
      </xsl:if>
      </xsl:template>

      Any clues as to why this might work in HTML and XML, but not in PDF?

      Thanks in advance for any advice -

      Michael
    • Show all 7 messages in this topic