RE: [xsl] processing multiple input documents sharing same DTD

Subject: RE: [xsl] processing multiple input documents sharing same DTD
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 20 Dec 2004 21:07:25 -0000
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.Breygin@xxxxxxxxxxxxxxx] 
> Sent: 20 December 2004 19:24
> To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> 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

Current Thread