xsl-list
[Top] [All Lists]

RE: problems caused by DOCTYPE

2004-05-12 12:58:48
At 03:29 PM 5/12/2004, you wrote:
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?


Glad it worked!

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.

Hope that helps!


Regards, Zolmol

> -----Original Message-----
> From: Chris Loschen [mailto:closchen(_at_)stanfordalumni(_dot_)org]
> Sent: Wednesday, May 12, 2004 2:02 PM
> To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
> 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!
>

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

Yours,

Chris Loschen
closchen(_at_)stanfordalumni(_dot_)org
781-718-3017 (cell)




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