Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Problem with Ant task <xsl.xinclude>
Problem with Ant task <xsl.xinclude> [message #232338] Wed, 10 June 2009 17:43 Go to next message
Patrick Schoenbach is currently offline Patrick SchoenbachFriend
Messages: 110
Registered: July 2009
Senior Member
Hi,

my Ant script looks as follows:

<project name="org.eclipse.xpand.doc" basedir="${basedir}">

<!--
Global vars
-->
<property name="document.name" value="xpand_reference" />
<property name="document.name.combined"
value="${document.name}_combined" />
<property name="src.dir" value="${basedir}/src/5.0/structure" />
<property name="styles.dir" value="src/styles" />
<property name="xslt.dir" value="${styles.dir}/xslt" />
<property name="css.dir" value="${styles.dir}/css" />

<property name="document.stylesheet" value="${xslt.dir}/article.xsl" />
<property name="document.pdf.stylesheet" value="${xslt.dir}/xmpp.xsl"
/>

<property name="document.eclipse.stylesheet"
value="${xslt.dir}/eclipsehelp.xsl" />
<property name="html-css.file" value="${css.dir}/book.css" />
<property name="eclipsehelp-css.file" value="${html-css.file}" />

<property name="build.dir" value="build" />
<property name="download.dir"
value="${java.io.tmpdir}${file.separator}downloads" />

<target name="merge">
<echo>Nerging article parts...</echo>
<xsl.xinclude in="${src.dir}/${document.name}.xml"
out="${build.dir}/${document.name.combined}.xml" />
</target>

<target name="docbook2eclipsehelp"
depends="get-fop,get-docbook-xsl,merge">
<echo>Converting article to Eclipe Help...</echo>
<delete dir="${basedir}/help"
failonerror="false"
excludes="CVS"
includeemptydirs="true" />
<copy todir="${basedir}/help/images">
<fileset dir="images">
<include name="**/*" />
</fileset>
</copy>
<copy file="${eclipsehelp-css.file}" todir="${basedir}/help" />

<xslt basedir="${build.dir}"
destdir="${basedir}"
style="${document.eclipse.stylesheet}">
<param name="chunk.quietly" expression="1" />
<include name="${document.name}.xml" />
<factory name="org.apache.xalan.processor.TransformerFactoryImpl">
<attribute name="http://xml.apache.org/xalan/features/optimize"
value="true" />
</factory>
<xmlcatalog>
<entity publicId="chunk.xsl"

location=" ${docbook.dir}${file.separator}html${file.separator}chunk.xs l "
/>
</xmlcatalog>
<param name="header.rule" expression="1" />
</xslt>
</target>
</project>

However, if I run "merge", I get:

merge:
[echo] Nerging article parts...
[xsl.xinclude] Changes detected. Creating a new output file
[xsl.xinclude] Warnung: Die Codierung 'UTF-8' wird von Java Runtime
nicht unterstützt.
[xsl.xinclude] Warning: encoding "UTF-8" not supported, using UTF-8

But no output file is created. What am I missing?

--
Regards,
Patrick

--
Patrick Schönbach
Software Architect

PGP public key available. Key ID: 0B7DDE39
Or email to pgp@robustsoft.de with subject 'pschoenb'.
Fingerprint: BE80 0E7E B68E CE99 623C 902D 62A6 806A 0B7D DE39

web: http://www.itemis.de
twitter: http://www.twitter.com/itemis
mail: schoenbach@itemis.de
xing: https://www.xing.com/profile/Patrick_Schoenbach

itemis AG
Schauenburgerstraße 116
24118 Kiel
Germany

Rechtlicher Hinweis:
Amtsgericht Dortmund, HRB 20621
Vorstand: Wolfgang Neuhaus, Jens Wagener, Dr. Georg Pietrek
Aufsichtsrat: Dr. Burkhard Igel(Vors.), Stephan Grollmann, Michael
Neuhaus
Re: Problem with Ant task <xsl.xinclude> [message #232344 is a reply to message #232338] Wed, 10 June 2009 20:12 Go to previous message
Eclipse UserFriend
Originally posted by: dcarver.starstandard.org

What does your XML file look like that has the inclusions. The
following is what we use to create the combined Docbook file that we
then generate the XSL Tools help from:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<book id="XSLUser" xmlns:xi="http://www.w3.org/2001/XInclude">
<bookinfo>
<title>XSL Tools User Documentation</title>
<author>
<firstname>David</firstname>
<surname>Carver</surname>
</author>
<copyright>
<year>2008</year>
<holder>Eclipse Foundation and others</holder>
</copyright>
</bookinfo>
<xi:include href="concepts/gettingstarted.xml"/>
<xi:include href="concepts/concepts.xml"/>
<xi:include href="editor/editor.xml"/>
<xi:include href="launching/launching.xml"/>
<xi:include href="preferences/preferences.xml"/>
<xi:include href="general/general.xml"/>
<xi:include href="samples/samples.xml"/>
<xi:include href="legal.xml"/>
</book>

And the Xinclude script for this looks like:

<target name="merge">
<xsl.xinclude in="${docbooksource}/xslhelp.dbk"
out="${docbooksource}/xslhelpcombined.dbk"/>
</target>


It's important that you have the XInclude namespace and entries setup
correctly in your XML.

The full process we use is documented here:

http://wiki.eclipse.org/Authoring_Eclipse_Help_Using_DocBook


Dave

Patrick Schönbach wrote:
> Hi,
>
> my Ant script looks as follows:
>
> <project name="org.eclipse.xpand.doc" basedir="${basedir}">
>
> <!--
> Global vars
> -->
> <property name="document.name" value="xpand_reference" />
> <property name="document.name.combined"
> value="${document.name}_combined" />
> <property name="src.dir" value="${basedir}/src/5.0/structure" />
> <property name="styles.dir" value="src/styles" />
> <property name="xslt.dir" value="${styles.dir}/xslt" />
> <property name="css.dir" value="${styles.dir}/css" />
>
> <property name="document.stylesheet" value="${xslt.dir}/article.xsl" />
> <property name="document.pdf.stylesheet" value="${xslt.dir}/xmpp.xsl"
> />
>
> <property name="document.eclipse.stylesheet"
> value="${xslt.dir}/eclipsehelp.xsl" />
> <property name="html-css.file" value="${css.dir}/book.css" />
> <property name="eclipsehelp-css.file" value="${html-css.file}" />
>
> <property name="build.dir" value="build" />
> <property name="download.dir"
> value="${java.io.tmpdir}${file.separator}downloads" />
>
> <target name="merge">
> <echo>Nerging article parts...</echo>
> <xsl.xinclude in="${src.dir}/${document.name}.xml"
> out="${build.dir}/${document.name.combined}.xml" />
> </target>
>
> <target name="docbook2eclipsehelp"
> depends="get-fop,get-docbook-xsl,merge">
> <echo>Converting article to Eclipe Help...</echo>
> <delete dir="${basedir}/help"
> failonerror="false"
> excludes="CVS"
> includeemptydirs="true" />
> <copy todir="${basedir}/help/images">
> <fileset dir="images">
> <include name="**/*" />
> </fileset>
> </copy>
> <copy file="${eclipsehelp-css.file}" todir="${basedir}/help" />
>
> <xslt basedir="${build.dir}"
> destdir="${basedir}"
> style="${document.eclipse.stylesheet}">
> <param name="chunk.quietly" expression="1" />
> <include name="${document.name}.xml" />
> <factory name="org.apache.xalan.processor.TransformerFactoryImpl">
> <attribute name="http://xml.apache.org/xalan/features/optimize"
> value="true" />
> </factory>
> <xmlcatalog>
> <entity publicId="chunk.xsl"
>
> location=" ${docbook.dir}${file.separator}html${file.separator}chunk.xs l "
> />
> </xmlcatalog>
> <param name="header.rule" expression="1" />
> </xslt>
> </target>
> </project>
>
> However, if I run "merge", I get:
>
> merge:
> [echo] Nerging article parts...
> [xsl.xinclude] Changes detected. Creating a new output file
> [xsl.xinclude] Warnung: Die Codierung 'UTF-8' wird von Java Runtime
> nicht unterstützt.
> [xsl.xinclude] Warning: encoding "UTF-8" not supported, using UTF-8
>
> But no output file is created. What am I missing?
>
Previous Topic:MIME mapping for WSDL file
Next Topic:Creation of Webservice error
Goto Forum:
  


Current Time: Wed Nov 26 04:35:54 GMT 2014

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

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