Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Copy an embedded DTD from source XML in XLST...

Reply
Thread Tools

Copy an embedded DTD from source XML in XLST...

 
 
Greg Jones
Guest
Posts: n/a
 
      05-10-2004
Hello,

This may be a simple question but difficult to search on since the
keywords are so generic.

Is there a way, in XSLT, to copy an embedded DTD from the source XML
to the target XML? Using 'match="processing-instruction()"' doesn't
work. I have been forced to simply output the DTD in the XSLT with
<xslt:text>.

Any ideas? Thanks!
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      05-10-2004


Greg Jones wrote:


> This may be a simple question but difficult to search on since the
> keywords are so generic.
>
> Is there a way, in XSLT, to copy an embedded DTD from the source XML
> to the target XML? Using 'match="processing-instruction()"' doesn't
> work. I have been forced to simply output the DTD in the XSLT with
> <xslt:text>.


As DOCTYPE nodes are not part of the XSLT/XPath data model you can't
copy (or otherwise process) them with XSLT.

--

Martin Honnen
http://JavaScript.FAQTs.com/

 
Reply With Quote
 
 
 
 
Greg Jones
Guest
Posts: n/a
 
      05-12-2004
I bet no one reading this is smart enough to write an XSLT extension
to handle embedded DTDs...

I dare you...



ps - thanks for the confirmation!

Martin Honnen <(E-Mail Removed)> wrote in message news:<409f9e1f$(E-Mail Removed)>...
> Greg Jones wrote:
>
>
> > This may be a simple question but difficult to search on since the
> > keywords are so generic.
> >
> > Is there a way, in XSLT, to copy an embedded DTD from the source XML
> > to the target XML? Using 'match="processing-instruction()"' doesn't
> > work. I have been forced to simply output the DTD in the XSLT with
> > <xslt:text>.

>
> As DOCTYPE nodes are not part of the XSLT/XPath data model you can't
> copy (or otherwise process) them with XSLT.

 
Reply With Quote
 
Magnus Henriksson
Guest
Posts: n/a
 
      05-12-2004
"Greg Jones" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) m...
> I bet no one reading this is smart enough to write an XSLT extension
> to handle embedded DTDs...
>
> I dare you...
>
>


SAXON has an extension for this:
http://saxon.sourceforge.net/saxon6....#saxon:doctype

<snip>


//Magnus


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML file from one DTD to another DTD test Java 2 07-28-2006 08:48 PM
How to specify DTD to DTD.getDTD for DocumentParser? Ronald Fischer Java 4 03-17-2005 09:37 AM
Removing the dtd name when using print(...) on the dtd generated class Joseph Tilian Java 0 12-21-2004 02:58 PM
Using XSLT to validate source XML's DTD Duane Morin XML 1 12-11-2003 07:31 PM
Including a dtd into another dtd... possible? Asfand Yar Qazi XML 1 09-19-2003 12:10 PM



Advertisments