You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Jon Steeves <Jo...@pmc-sierra.com> on 2004/11/04 20:17:39 UTC

Problem with FOP and Schemas

Hello:

  I have a strange problem that I'll try to describe:

When I run FOP on an .fo file that was generated by an xslt transform of an xml file with a Doctype reference, everything works fine and the PDF is generated. 

 (e.g., <!DOCTYPE my_doc SYSTEM "C:\my_doc.dtd">) 



However, when I replace the Doctype reference in the xml file with an xmlSchema reference

  (e.g., <reg_doc xmlns:xsi="C:\my_doc.xsd">)


 FOP halts processing with the message: 

   "6997:679 Currently only table rows are supported in the table body, header, and footer"

 and doesn't generate the document.

 Some key points:

  1. The xslt transformation still works fine
  2. All the permissions are correct for accessing both the .dtd and the .xsd file.

Does anyone have any idea why this might be happening?  Could it have something to do with ID attributes?

Thanks

Jon Steeves

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Problem with FOP and Schemas

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Jon Steeves wrote:
> When I run FOP on an .fo file that was generated by an xslt transform of an xml file with a Doctype reference, everything works fine and the PDF is generated. 
> 
>  (e.g., <!DOCTYPE my_doc SYSTEM "C:\my_doc.dtd">) 
> 
> However, when I replace the Doctype reference in the xml file with an xmlSchema reference
> 
>   (e.g., <reg_doc xmlns:xsi="C:\my_doc.xsd">)
> 
> 
>  FOP halts processing with the message: 
> 
>    "6997:679 Currently only table rows are supported in the table body, header, and footer"
> 
>  and doesn't generate the document.

Guess: The DTD contains default values for attributes, possibly
namespaces, and there is something related to table row generation
triggered by such default values in the stylesheet.

> Could it have something to do with ID attributes?

That's another possiblity. Without the DTD, the id() function always
silently returns an empty set. Use a key instead, unless you have
IDREFS lists.

A third possiblity is that you unintentionally tampered with the
default namespace in the version with the schema.

Run the transformation standalone for both possiblities and compare
the resulting FO files.

Note that:
a) No existing parser loads an XSchema by default, you have to
   configure it explicitely.
b) You have to use schemaLocation to tell the parser the schema
  location. A namespace declaration is not a schema location.
c) Commonly, schema locations have to be URIs. Windows path names
  wont cut it.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org