You may be running different versions of Java on the two platforms. The
validation of URIs in entity declarations is done by the XML parser, quite
possibly using underlying methods offered by the Java platform. I don't
think this problem has anything to do with XSLT or your XSLT processor -
you'll almost certainly find that the document won't parse if run outside an
XSLT environment.
Difficult to be more specific about why your URI is invalid since you've
modified it for public consumption. But I suspect you are trying to supply a
UNC filename rather than a URI. Products vary on how tolerant they are of
that kind of thing, but it's not allowed by the specs.
Michael Kay
-----Original Message-----
From: Sam Wilmott [mailto:sam(_at_)wilmott(_dot_)ca]
Sent: 20 February 2008 04:14
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] "Illegal character in authority" error running
java Saxon under Windows
I'm using the Java version of Saxon-B 8.9 and Saxon-B 9.0.02
on both Mac OS X 10.5 and Windows XP Pro for processing XML
documents using XSLT 2.0. I'm running Saxon in command-line
form in both cases (CMD in Windows and Terminal in Mac OS).
I'm having a problem with an input XML document whose DTD
contains an NDATA entity declared like this:
<!ENTITY xxxxx PUBLIC "-//xxxxxx//XXXX xxxxxx//EN"
"//xx-xxx-xxxxxx
x/xxxxx/xxx/xxx/xxxxxx/xxxxxxx/xxxx/xxxxx/xxxxxx/xxxxxxxxxxxx.jpg"
NDATA XXXX>
whose name is used as the value of an attribute that's
declared like this:
entname ENTITY #REQUIRED
e.g. it's used like this:
<xxx entname="xxxxx"/>
The XSLT 2.0 script runs just fine under Mac OS, but under
Windows the program terminates with an error message like
this (I've stripped out a long list of nested method names,
but that's all):
java.lang.IllegalArgumentException
at ...
Caused by: java.net.URISyntaxException: Illegal character in
authority at index 2: //xx-xxx-xxxxxx
x/xxxxx/xxx/xxx/xxxxxx/xxxxxxx/xxxx/xxxxx/xxxxxx/xxxxxxxxxxxx.jpg
at ...
Fatal error during transformation:
java.lang.IllegalArgumentException: (no message)
Note that there's a space in the SYSTEM name of the entity.
If I remove it, the XSLT script runs just fine. So it looks
like the space is the "Illegal character".
Does anyone know what's going on here? Most importantly, I
would like to process documents with entity declarations like
the above without having to change the source XML documents
by removing spaces in entity SYSTEM names. Is there a way of
doing that?
------------
Sam Wilmott
sam(_at_)wilmott(_dot_)ca
www.wilmott.ca
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--