
Following error when attempting to transforme a docbook Website: System ID: /usr/local/website-2.6.0/xml/website-full.dtd Description: F The markup in the document preceding the root element must be well-formed. Raymond

Dear Raymond, The XSLT transformation of a DocBook Website 2.6.0 XML document that is valid against website-full.dtd should not produce errors. I was able to validate [website-2.6.0-dir]/example/full.xml, transform it to HTML and view it in a web browser without errors. If you can do the same with full.xml and you did not edit the website-full.dtd file of the DocBook Website distribution please post a small sample XML document so the error can be reproduced and specify the parameters of the transformation scenario that you are using. If you edited the website-full.dtd file then you should also post it together with the XML sample. Best regards, Sorin Raymond wrote:
Following error when attempting to transforme a docbook Website:
System ID: /usr/local/website-2.6.0/xml/website-full.dtd Description: F The markup in the document preceding the root element must be well-formed.
Raymond _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Utilizing Kubuntu-5.04 (best linux notebook distro to date :-), Saxon-6.5.3, Website-2.6.0 (layout.dtd, autolayout.xsl), jdk-1.5.0_03 and oXygen-6.0 When transforming layout.xml to autolayout.xml utilizing the following code: ------------------------------------------------------------------- <layout> <config param="text-prefix" value="txt"/> <config param="homebanner-tabular" value="graphics/homebanner.png" altval="Home Banner"/> <config param="banner-tabular" value="graphics/banner.png" altval="Banner"/> <config param="homebanner" value="graphics/homebanner.png" altval="Home Banner"/> <config param="banner" value="graphics/icons/iconhome.gif" altval="Banner"/> <copyright> <year>2005</year> <year>2004</year> <holder role="http://www.foo.org/">Raymond</holder> </copyright> <style src="example.css" type="text/css"/> <toc page="foo.xml" filename="index.html"/> </layout> <!-- EOF --> --------------------------------------------------------------------------- validates but the following error is generated: ----------------------------------------------------------- Processing terminated by xsl:message at line 128 ----------------------------------------------------------- The offending code is the toc tag. Raymond

Dear Raymond, The transformation ends because the root element of foo.xml specified in the toc element does not have an id attribute. This is reported as an error by the Website stylesheet and is caused by the condition: <xsl:if test="not($page/*[1]/@id)"> <xsl:message terminate="yes"> <xsl:value-of select="@page"/> <xsl:text>: missing ID.</xsl:text> </xsl:message> </xsl:if> when the page variable contains the nodeset corresponding to foo.xml specified in the toc element of layout.xml. Just add an id attribute for example id="layout-id" and you will get the attached document autolayout.xml. If you set Xalan as XSLT transformer in the transformation scenario you get a more informative error message: foo.xml: missing ID. We already know about this bug in the integration of Saxon in <oXygen/> - not reporting the content of a terminating xsl:message, just reporting that the processing was terminated - and we are working on it. Best regards, Sorin Raymond wrote:
Utilizing Kubuntu-5.04 (best linux notebook distro to date :-), Saxon-6.5.3, Website-2.6.0 (layout.dtd, autolayout.xsl), jdk-1.5.0_03 and oXygen-6.0
When transforming layout.xml to autolayout.xml utilizing the following code: ------------------------------------------------------------------- <layout> <config param="text-prefix" value="txt"/> <config param="homebanner-tabular" value="graphics/homebanner.png" altval="Home Banner"/> <config param="banner-tabular" value="graphics/banner.png" altval="Banner"/> <config param="homebanner" value="graphics/homebanner.png" altval="Home Banner"/> <config param="banner" value="graphics/icons/iconhome.gif" altval="Banner"/> <copyright> <year>2005</year> <year>2004</year> <holder role="http://www.foo.org/">Raymond</holder> </copyright> <style src="example.css" type="text/css"/> <toc page="foo.xml" filename="index.html"/> </layout> <!-- EOF --> ---------------------------------------------------------------------------
validates but the following error is generated:
----------------------------------------------------------- Processing terminated by xsl:message at line 128 -----------------------------------------------------------
The offending code is the toc tag.
Raymond _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

The id is required but did not completely solve the problem: ---------------------------------------- <!DOCTYPE webpage PUBLIC "-//Norman Walsh//DTD Website Full V2.6//EN" "file:///usr/local/docbook-website/schema/dtd/website-full.dtd" [ <!ENTITY % sharedEntities SYSTEM "file:///_srcBase_/foo/website/foo.ent"> %sharedEntities; ]> --------------------------------------- fails with error 128 while --------------------------------------- <!DOCTYPE webpage PUBLIC "-//Norman Walsh//DTD Website Full V2.6//EN" "file:///usr/local/docbook-website/schema/dtd/website-full.dtd"> ------------------------------------- transforms without error. Note _srcBase_ is defined in a global catalog as ------------------------------------------------------------------------------ <rewriteSystem systemIdStartString="file:///_srcBase_/" rewritePrefix="file:///home/foo/docbook/" /> ---------------------------------------------------------------------------------- and is resloved prior to ------------------------------------------------------------------------------ <nextCatalog catalog="catalog.xml" xml:base="file:///usr/local/docbook-website/" /> ---------------------------------------------------------------------------------- Works fine with both docbook.xsl and chunk.xsl Would appear the autolayout stylesheet may not like Entity declarations ... Raymond

Dear Raymond, After you generate the intermediate file autolayout.xml you should process it with one of the Website stylesheets that generate the entire site, for example chunk-tabular.xsl or chunk-website.xsl and not process separate webpages with autolayout.xsl. The stylesheet autolayout.xsl is used only to generate the layout file autolayout.xml. For more details please see http://www.sagehill.net/docbookxsl/GenerateWebpages.html Best regards, Sorin Raymond wrote:
The id is required but did not completely solve the problem:
----------------------------------------
<!DOCTYPE webpage PUBLIC "-//Norman Walsh//DTD Website Full V2.6//EN"
"file:///usr/local/docbook-website/schema/dtd/website-full.dtd"
[
<!ENTITY % sharedEntities SYSTEM
"file:///_srcBase_/foo/website/foo.ent">
%sharedEntities;
]>
---------------------------------------
fails with error 128 while
---------------------------------------
<!DOCTYPE webpage PUBLIC "-//Norman Walsh//DTD Website Full V2.6//EN"
"file:///usr/local/docbook-website/schema/dtd/website-full.dtd">
-------------------------------------
transforms without error.
Note _srcBase_ is defined in a global catalog as
------------------------------------------------------------------------------
<rewriteSystem
systemIdStartString="file:///_srcBase_/"
rewritePrefix="file:///home/foo/docbook/" />
----------------------------------------------------------------------------------
and is resloved prior to
------------------------------------------------------------------------------
<nextCatalog catalog="catalog.xml"
xml:base="file:///usr/local/docbook-website/" />
----------------------------------------------------------------------------------
Works fine with both docbook.xsl and chunk.xsl
Would appear the autolayout stylesheet may not like Entity declarations ...
Raymond
------------------------------------------------------------------------
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
participants (2)
-
Raymond
-
Sorin Ristache