Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Docbook XML Transformation JAXPSAXProcessorInvoker XPath error
Docbook XML Transformation JAXPSAXProcessorInvoker XPath error [message #226758] Thu, 15 January 2009 18:41 Go to next message
Eric Bresie is currently offline Eric Bresie
Messages: 44
Registered: July 2009
Member
I working on some XML / XSL Transformation based on an older article (see
http://www.vogella.de/articles/DocBook/article.html ) which talks
""DocBook and XSLT conversion with Eclipse and Apache Ant - Tutorial".

Rather than use the ant based transformation, I decided to try using an
XSL Run Configuration.

I created a General Project.
Created a src and output folders
I am using the example from the article which looks like the following:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"../docbook-xml-4.5/docbookx.dtd">
<article>
<articleinfo>
<title>DocBook Intro</title>
<author>
<firstname>Firstname</firstname>
<surname>Lastname</surname>
</author>
</articleinfo>
<sect1 label="1.0">
<title>An introduction to DocBook</title>
<para>
This is text.
</para>
</sect1>
</article>

* Slightly modified for my purposes; I tried with and without the last tag
which I suspect may be incorrect)

Copied the docbook XSL and XML folders/files

In the configuration, I set for the XML Input File, using Workspace... to
select the file.

-----------
On a side note, when I selected it, it put

${workspace_loc:/DocbookProject/src/ExampleArticle.xml}

Is this correct or should it have inserted something like:

${workspace_loc}/DocbookProject/src/ExampleArticle.xml

??
------------

Transformation Pipeline: selected the html\docbook.xsl which I want to
transform the Docbook XML file into a basic HTML file.

Processor: to be JRE Instance Default.
Output File..Location to be

${workspace_loc}/DocbookProject/output/ExampleArticle.out.xm l

JRE: to be 1.6.0_11.

Now when I run the XSL tranformation, there are a number of WARN items
(which I don't believe are of significance) and a couple of ERRORs. See
below.

Isn't test="* or $generate.index != 0" a valid test expression?

Is this a bug? Is this a problem with my XML? My XSL?

Any help is appreciated..

Eric

===================
Environment:

Eclipse 3.4.1
(M20080911-1700)

Web Standard Tools SDK:
Version: 3.0.3.v200809250443-7D-8l8XkDnRhz-ylP58ABwz-FP3f
Build id: 20080918035538

Web Standard Tools:
Version: 3.0.3.v200809250443-7A-8i8Qqcz0FaVgjXSD6brFQN64Z
Build id: 20080918035538

WTP XSL Tools
Version: 0.5.0.v200808041223-6872EC3wSUIU7eJGVdY_1
Build id: 20080820002020


=======================
12:37:33,957 INFO [main] Main -
javax.xml.transform.TransformerFactory=null
12:37:33,988 INFO [main] Main - java.endorsed.dirs=C:\Program
Files\Java\jdk1.6.0_11\jre\lib\endorsed
12:37:34,066 INFO [main] Main - launchFile:
E:\workspace\.metadata\.plugins\org.eclipse.wst.xsl.launchin g\launch\launch.xml
12:37:39,921 WARN [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/au toidx.xsl:
line 476: Attribute 'href' outside of element.
12:37:39,921 WARN [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/au toidx.xsl:
line 514: Attribute 'href' outside of element.
12:37:39,921 WARN [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/au toidx.xsl:
line 537: Attribute 'href' outside of element.
12:37:39,921 WARN [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/ca llout.xsl:
line 105: Attribute 'href' outside of element.
12:37:39,921 WARN [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/xr ef.xsl: line
177: Attribute 'href' outside of element.
12:37:39,921 WARN [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/xr ef.xsl: line
968: Attribute 'href' outside of element.
12:37:39,921 WARN [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/in line.xsl: line
97: Attribute 'href' outside of element.
12:37:39,921 WARN [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/in line.xsl: line
138: Attribute 'href' outside of element.
12:37:39,952 WARN [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/in line.xsl: line
148: Attribute 'target' outside of element.
12:37:39,952 WARN [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/in line.xsl: line
175: Attribute 'href' outside of element.
12:37:39,952 WARN [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/in line.xsl: line
701: Attribute 'href' outside of element.
12:37:39,952 WARN [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/in line.xsl: line
922: Attribute 'href' outside of element.
12:37:39,952 WARN [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/in line.xsl: line
1047: Attribute 'href' outside of element.
12:37:39,952 WARN [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/in line.xsl: line
1178: Attribute 'href' outside of element.
12:37:39,952 WARN [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/in line.xsl: line
1279: Attribute 'href' outside of element.
12:37:39,952 WARN [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/in line.xsl: line
1316: Attribute 'href' outside of element.
12:37:39,952 WARN [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/gl ossary.xsl:
line 253: Attribute 'href' outside of element.
12:37:39,952 WARN [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/gl ossary.xsl:
line 315: Attribute 'href' outside of element.
12:37:39,952 WARN [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/an notations.xsl:
line 117: Attribute 'onClick' outside of element.
12:37:39,952 ERROR [main] JAXPSAXProcessorInvoker - Syntax error in '* or
$generate.index != 0'.
12:37:39,952 ERROR [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/au totoc.xsl:
line 373: Error parsing XPath expression '* or $generate.index != 0'.
12:37:39,952 ERROR [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/au totoc.xsl:
line 373: Required attribute 'test' is missing.
12:37:39,952 ERROR [main] JAXPSAXProcessorInvoker - Syntax error in '* or
$generate.index != 0'.
12:37:39,952 ERROR [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/au totoc.xsl:
line 492: Error parsing XPath expression '* or $generate.index != 0'.
12:37:39,952 ERROR [main] JAXPSAXProcessorInvoker -
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/au totoc.xsl:
line 492: Required attribute 'test' is missing.
12:37:39,998 ERROR [main] JAXPSAXProcessorInvoker - Could not compile
stylesheet
javax.xml.transform.TransformerConfigurationException: Could not compile
stylesheet
at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFact oryImpl.newTemplates(TransformerFactoryImpl.java:825)
at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFact oryImpl.newTransformer(TransformerFactoryImpl.java:614)
at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFact oryImpl.newTransformerHandler(TransformerFactoryImpl.java:90 0)
at
org.eclipse.wst.xsl.invoker.JAXPSAXProcessorInvoker.addStyle sheet(JAXPSAXProcessorInvoker.java:132)
at
org.eclipse.wst.xsl.invoker.JAXPSAXProcessorInvoker.addStyle sheet(JAXPSAXProcessorInvoker.java:123)
at
org.eclipse.wst.xsl.invoker.config.PipelineDefinition.config ure(PipelineDefinition.java:163)
at org.eclipse.wst.xsl.invoker.Main.main(Main.java:71)
12:37:40,029 FATAL [main] Main - Error with stylesheet:
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/do cbook.xsl
org.eclipse.wst.xsl.invoker.ConfigurationException: Error with stylesheet:
file:/E:/workspace/DocbookProject/docbook-xsl-1.74.0/html/do cbook.xsl
at
org.eclipse.wst.xsl.invoker.config.PipelineDefinition.config ure(PipelineDefinition.java:167)
at org.eclipse.wst.xsl.invoker.Main.main(Main.java:71)
Re: Docbook XML Transformation JAXPSAXProcessorInvoker XPath error [message #226766 is a reply to message #226758] Thu, 15 January 2009 18:44 Go to previous messageGo to next message
Eric Bresie is currently offline Eric Bresie
Messages: 44
Registered: July 2009
Member
Correction:

> * Slightly modified for my purposes; I tried with and without the last tag
> which I suspect may be incorrect)

Originally the last tag in the example was an "</xi:include>". I removed
for posting purposes. I did not omit the last "</article>" tag.

Eric
Re: Docbook XML Transformation JAXPSAXProcessorInvoker XPath error [message #226775 is a reply to message #226758] Thu, 15 January 2009 19:41 Go to previous message
Eclipse User
Originally posted by: dcarver.starstandard.org

Hi Eric. I'm a committer on XSL Tools, and use Docbook with it quite
frequently. I'll try and answer your questions below.

Eric Bresie wrote:
> I working on some XML / XSL Transformation based on an older article
> (see http://www.vogella.de/articles/DocBook/article.html ) which talks
> ""DocBook and XSLT conversion with Eclipse and Apache Ant - Tutorial".
> Rather than use the ant based transformation, I decided to try using an
> XSL Run Configuration.
> I created a General Project.
> Created a src and output folders
> I am using the example from the article which looks like the following:
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
> "../docbook-xml-4.5/docbookx.dtd">
> <article>
> <articleinfo>
> <title>DocBook Intro</title>
> <author>
> <firstname>Firstname</firstname>
> <surname>Lastname</surname>
> </author>
> </articleinfo>
> <sect1 label="1.0">
> <title>An introduction to DocBook</title>
> <para> This is text.
> </para>
> </sect1>
> </article>
>
> * Slightly modified for my purposes; I tried with and without the last
> tag which I suspect may be incorrect)
>
> Copied the docbook XSL and XML folders/files
>
> In the configuration, I set for the XML Input File, using Workspace...
> to select the file.
>
> -----------
> On a side note, when I selected it, it put
>
> ${workspace_loc:/DocbookProject/src/ExampleArticle.xml}
>
> Is this correct or should it have inserted something like:
>
> ${workspace_loc}/DocbookProject/src/ExampleArticle.xml

The above is correct. The later will work as well, but the one it puts
there is correct.



>
> Transformation Pipeline: selected the html\docbook.xsl which I want to
> transform the Docbook XML file into a basic HTML file.
>
> Processor: to be JRE Instance Default.
> Output File..Location to be
> ${workspace_loc}/DocbookProject/output/ExampleArticle.out.xm l
>
> JRE: to be 1.6.0_11.

The Docbook Stylsheets are known to have problems with the Default JRE
because it compiles them using XSLTC. I recommend specifically using
the Xalan processor and not the default JRE processor.


>
> Now when I run the XSL tranformation, there are a number of WARN items
> (which I don't believe are of significance) and a couple of ERRORs. See
> below.
>
> Isn't test="* or $generate.index != 0" a valid test expression?
>
> Is this a bug? Is this a problem with my XML? My XSL?
> Any help is appreciated..
>

Try running it with Xalan as the processor in Interpretive mode.

Also, if any of the articles have XInclude in them, then you need to
pre-process them with them first. One of the items we need to do is
add this pre-processing as an option for the pipeline.

Since you are using XSL Tools it does include an XInclude ant task, that
can be used to pre-process the xml files. You can see how to use it here:

http://wiki.eclipse.org/Authoring_Eclipse_Help_Using_DocBook


Any other questions please post them to the group and I'll see if I can
answer them.

Dave
Previous Topic:Re: Bug life cycle ?
Next Topic:Eclipse and Glassfish
Goto Forum:
  


Current Time: Fri Sep 19 16:08:57 GMT 2014

Powered by FUDForum. Page generated in 0.03027 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software