This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] WIN32 toolset that resolves entities, uses catalogs


Hi Chris,

my impression from reading the list is that Saxon and xsltproc work better than Xalan. Personally, I'm using xsltproc and am pretty satisfied with the results. I'm working on Win32 as well, but am using Cygwin for my docbook processing. Cygwin is a unix-like environment for windows. You can get it here: http://www.cygwin.com/

Alternatively there's a Win32 port of xsltproc by Igor Zlatkovic here: http://www.zlatkovic.com/softbits.en.html

Both work fine with entities and XML catalogs. I don't have any experience with Xalan, so I can not comment on your issues there.


HTH, Patrick

Chris Johnson schrieb:

Hi,

I'm looking for feedback from people that are processing docbook files
in a WIN32 environment (*not* my choice, would rather use *NIX)
I have been working on making my docbook documents more modular, and up
until now, Xalan has been working just fine.

I'm new to using entities in this way, so I realize I could have gone
wrong in several places  : (

Now with the following test file, Xalan throws an error:

file:/K:/DATA/RESTRICT/FAMIS/help/xml/main/../common/entities-test.xml;
Line #4; Column #-1; XSLT Error
(javax.xml.transform.TransformerException): External parameter entity
"%CommonEntities;" has characters after markup.

I am using DocBook XML V4.2, DocBook XSL V1.61.3.

test-resolve.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";

[
<!ENTITY % CommonEntities SYSTEM "../common/entities-test.xml">
%CommonEntities;
]>

<book lang="en"><title>Test Entity Resolution</title>
<bookinfo>
&chris;
</bookinfo>

<chapter id="bgt-data">
  <title>Data Entry</title>

  <sect1 id="bgt-data-cost">
    <title>Cost Centres</title>

		<para>The Cost Centres data entry page allows some users
to maintain
      (add, delete and edit) information relating to cost centres.
Other users
      (most users) will have read-only access to cost centre
information.</para>
	</sect1>
</chapter>
</book>

entities-test.xml:

<?xml version="1.0" encoding="UTF-8"?>

<!-- People (authors and othercredits) -->
<!entity chris
"<author><firstname>Chris</firstname><surname>Johnson</surname></author>">

I ran a check on Xalan:

C:\>java org.apache.xalan.xslt.EnvironmentCheck
#---- BEGIN writeEnvironmentReport($Revision: 1.14 $): Useful stuff
found: ----
version.DOM.draftlevel=2.0fd
java.class.path=.
version.JAXP=1.1
java.ext.dirs=C:\Program Files\Java\j2re1.4.2_01\lib\ext
version.xerces2=not-present
version.xerces1=not-present
version.xalan2_2=Xalan Java 2.4.1
version.xalan1=not-present
version.ant=not-present
java.version=1.4.2_01
version.DOM=2.0
version.crimson=present-unknown-version
sun.boot.class.path=C:\Program
Files\Java\j2re1.4.2_01\lib\rt.jar;C:\Program Fil
es\Java\j2re1.4.2_01\lib\i18n.jar;C:\Program
Files\Java\j2re1.4.2_01\lib\sunrsas
ign.jar;C:\Program Files\Java\j2re1.4.2_01\lib\jsse.jar;C:\Program
Files\Java\j2
re1.4.2_01\lib\jce.jar;C:\Program
Files\Java\j2re1.4.2_01\lib\charsets.jar;C:\Pr
ogram Files\Java\j2re1.4.2_01\classes
version.SAX=2.0
version.xalan2x=Xalan Java 2.4.1
#----- END writeEnvironmentReport: Useful properties found: -----
# YAHOO! Your environment seems to be OK.

I have read Bob Stayton's note on Using catalogs with Xalan, so perhaps
is time to use a different setup...

Note (from http://sagehill.net/docbookxsl/UseCatalog.html#d0e3117 )

The current version of Xalan (2.5.1) does not resolve URIs from the
command line using the catalog file. However, if the same URI is used in
a stylesheet processing instruction inside the document (instead of
using the -xsl option), then the catalog is consulted and the URI
remapped.


SO... any thoughts on a working WIN32 setup that will resolve entities
and catalogs, or am I just doing something wrong here?

TIA,

Chris



To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]