Subject: RE: [xsl] problems caused by DOCTYPE From: Chris Loschen <closchen@xxxxxxxxxxxxxxxxxx> Date: Wed, 12 May 2004 15:58:48 -0400 |
Thanks, that works (copying the dtd file in the same directory as the input file).
Is there any other way resolving this issue, to avoid this copy manoeuvre?
The SYSTEM keyword indicates a system pathname, so it needs to represent where the DTD can actually be found -- XSLT is just following the XML spec here. You can satisfy the requirement by:
1. having a copy of the DTD in the working directory as you did 2. having the SYSTEM key represent an actual path to where the DTD is, for example, H:\projects\dtd\mga.dtd or the like -- however, beware because you're now stuck with a particular file-naming convention, so your colleagues who use a different OS like Linux would have to change the SYSTEM to a filename they can read. 3. have a shortcut or symbolic link or something like that pointing from the working directory to the actual location of the DTD. 4. Use the PUBLIC keyword instead so that the DTD can be found where that reference resolves to -- usually a URI of some sort.
I've usually used #3 and I've scripted a shortcut for each working directory so that it automatically gets placed in the directory I want to work in. That proved to be the simplest solution for my needs and kept the DTD itself in a single centralized location.
Regards, Zolmol
> -----Original Message----- > From: Chris Loschen [mailto:closchen@xxxxxxxxxxxxxxxxxx] > Sent: Wednesday, May 12, 2004 2:02 PM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: Re: [xsl] problems caused by DOCTYPE > > > At 02:52 PM 5/12/2004, you wrote: > > >Hi, > > > >I'd like to transform an xml file to another. > > > >I have the input file like: > ><?xml version="1.0" encoding="UTF-8"?> > ><!DOCTYPE project SYSTEM "mga.dtd"> > > Is the DTD in the working directory? How about any files > referenced in the DTD (e.g., entity files, includes, etc.)? > If not, your transformation would fail. You should be getting > some error messages in that case, but perhaps they're getting > logged somewhere that you haven't found yet. > > That's the first place I'd check, anyway. Good luck!
Chris Loschen closchen@xxxxxxxxxxxxxxxxxx 781-718-3017 (cell)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] problems caused by DOCTYP, Zoltan Molnar | Thread | RE: [xsl] problems caused by DOCTYP, Zoltan Molnar |
RE: [xsl] problems caused by DOCTYP, Zoltan Molnar | Date | [xsl] Whitespace between nodes, Nicholas Shanks |
Month |