[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Saxon -> UnknownHostException


Subject: Re: [xsl] Saxon -> UnknownHostException
From: omprakash.v@xxxxxxxxxxxxx
Date: Mon, 30 May 2005 12:15:30 +0530

Hi,
         Try this command line

%java -Dxml.catalog.files="<PATH_TO_YOUR_CATALOG_FILE>"
net.sf.saxon.Transform -o errors_meta.html xmlCommDir.xml
commMetaErrors.xsl

Of course your catalog should contain an entry for each one of your xml
files that includes a dtd with a public or system identifier that resolves
to the location of your dtd/schema.

Check the following URL for more information on creating catalogs.

http://www.xml.com/pub/a/2004/03/03/catalogs.html
http://xml.apache.org/xerces2-j/faq-xcatalogs.html#faq-3
http://java.sun.com/webservices/docs/1.2/jaxb/catalog.html (recommended)

As for a good XML parser, I use the xerces parser that gets shipped with
JAXP 1.3 and it works well for me.

Cheers,
Omprakash.V









                    "Madlik Monika"
                    <monika.madlik@lexi        To:
<xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
                    snexis.at>                 cc:     (bcc:
omprakash.v/Polaris)
                                               Subject:     [xsl] Saxon ->
UnknownHostException
                    05/30/2005 11:54 AM
                    Please respond to
                    xsl-list






Hello!

I told you about the problem I have with my external DTD last Wednesday.
Here is a short summary of my problem again: I tried to create an HTML-File
with Saxon and I gave Saxon an XML-File and an XSLT-File. But I got the
Error-Message: "Warning: java.net.UnknownHostException: dtd.ln.de".

You told me, that Saxon isn't interrested in the DTD. Which XML-Parser is a
good one for this problem and how can I include it in my batchfile? I tried
to perform DTD-based validation with the command line option "-v" but it
failed every time!

I'm still a beginner in learning XML, so please can you help me?

Kind regards,
Monika

-----Urspr|ngliche Nachricht-----
Von: xsl-list-digest-help@xxxxxxxxxxxxxxxxxxxxxx
[mailto:xsl-list-digest-help@xxxxxxxxxxxxxxxxxxxxxx]
Gesendet: Donnerstag, 26. Mai 2005 07:10
An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Betreff: xsl-list Digest 26 May 2005 05:10:00 -0000 Issue 428

xsl-list Digest 26 May 2005 05:10:00 -0000 Issue 428


Saxon -> UnknownHostException
           16743 by: Madlik Monika
           16753 by: Michael Kay


------------------------------

Date: Wed, 25 May 2005 15:25:36 +0200
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
From: "Madlik Monika" <monika.madlik@xxxxxxxxxxxxx>
Subject: Saxon -> UnknownHostException
Message-ID: <AA7BAD89B2B0C746A26452F44939F1E3B38C5B@xxxxxxxxxxxxxxxxxxxx>

Hello,

I'm working with XSLT 2.0 and Saxon 8.0.=20

I created a file named 'xmlAbgbDir.lst' where I put in all names of my =
existing xml-files. Then I wrote an xml-file (see example below) and an =
xslt-file.=20
I wrote a batchfile (see example below), with which I wanted to create =
an errorlist-html-file. But everytime I start the batchfile I get the =
message "Warning: java.net.UnknownHostException: dtd.ln.de". My =
xml-files include a dtd - but I had to insert this in the catalog-file =
of XML-Spy.
How can I tell Saxon to use a dtd generally for all my xml-file (though =
they even have a dtd)?

This is my xml-file:
---------------------------
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<!DOCTYPE xmlCommDir [
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 <!ENTITY xmlDirList SYSTEM =
"xmlAbgbDir.lst">
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 <!ELEMENT xmlCommDir (#PCDATA)>
]>
<xmlCommDir>&xmlDirList;</xmlCommDir>

My batchfile looks like this:
---------------------------------------
SET CLASSPATH=3D.;G:\xsl\Saxon\saxon8.jar;
java -Xmx512m net.sf.saxon.Transform -o errors_meta.html xmlCommDir.xml =
commMetaErrors.xsl=20

Kind regards,
Monika

------------------------------

Date: Wed, 25 May 2005 16:40:23 +0100
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Subject: RE: [xsl] Saxon -> UnknownHostException

> How can I tell Saxon to use a dtd generally for all my
> xml-file (though they even have a dtd)?

Saxon isn't interested in the DTD - it's the XML parser whose behaviour you
need to influence, not Saxon's behaviour. For example, you may want to
supply your own EntityResolver. You can check whether your chosen XML
parser
allows you to set the relevant options using Java system properties; if
not,
you have to write a bit of Java code that supplies Saxon with a
StreamSource
containing an XML parser that has already been configured with the
appropriate options. Alternatively, edit your source files to
include/exclude a reference to the DTD as appropriate.

Michael Kay
http://www.saxonica.com/






This e-Mail may contain proprietary and confidential information and is sent
for the intended recipient(s) only.
If by an addressing or transmission error this mail has been misdirected to
you, you are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction,
dissemination, copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its
attachment other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in


Current Thread
Keywords