xsl-list
[Top] [All Lists]

RE: processing multiple input documents sharing same DTD

2004-12-20 14:07:25
This isn't an XSLT question, it's an XML parsing question; and Saxon isn't
an XML parser, it simply uses an XML parser of your choice (usually the one
built into the Java JDK).

If your source XML document refers to the DTD using a relative URI then the
XML parser will indeed interpret it as being relative to the source XML
document: that's the correct behaviour.

If you want something more customized, consider using an EntityResolver or
an OASIS catalog. This is the wrong place to ask for details of these
mechanisms.

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

-----Original Message-----
From: Breygin, Victor 
[mailto:Victor(_dot_)Breygin(_at_)cbsa-asfc(_dot_)gc(_dot_)ca] 
Sent: 20 December 2004 19:24
To: 'xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com'
Subject: [xsl] processing multiple input documents sharing same DTD

Hello,

I need to process multiple input documents that reference the 
same DTD.
The XML documents have different network locations but all of 
them point to
the same
DTD assuming relative (rather than absolute) path. Here are a 
couple of
starting lines for
one of the input  XML docs:

<?xml version = '1.0' encoding = 'ISO-8859-1'?>
<!DOCTYPE XMI SYSTEM 'UML1311.dtd' >
<XMI xmi.version = '1.1' xmlns:UML='href://org.omg/UML/1.3' 
timestamp = 'Mon
Dec 20 13:43:41 2004' >
 
The SAXON parser seems to assume the document "UML1311.dtd" 
be located in
same directory
with the source XML file. I have to get a copy of that DTD 
file in all the
XML file's folders in order to get around
(which is not very convenient).

I wonder, is there any way I can set that DTD as a shared 
resource/reference
for all the input files so the parser
hitting the reference line will be re-routed to one single 
reference of
UML1311.dtd?

thanks for your help!

Victor Breygin
Consultant, Integrated Customs Systems,
Canada Border Services Agency
1-(613) 952-7077


--~------------------------------------------------------------------
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>
--~--



<Prev in Thread] Current Thread [Next in Thread>