[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Copy DTD with XSLT

Subject: Copy DTD with XSLT
From: Jesper Tverskov <jesper@xxxxxxxxxxx>
Date: Thu, 22 Aug 2013 10:43:25 +0200
 Copy DTD with XSLT
Hi list

Back in 2008 I made a monster of an analayze-string regex exercise in
order to copy a DTD (declaration and internal subset) with XSLT.

http://www.xmlplease.com/identity-template

It was part of my even bigger exercise: trying to make a true identity
transformation that recreates it all exactly as it was, including XML
Declaration and DTD, CDATA sections, character entities, whitespace
only text nodes, etc.

If the DTD subset is nasty, I found it almost impossible to locate the
last "gt" delimiter of the DTD. I remember how David Carlisle always
managed to come up with some new absurd DTD subset for testing that
would  break my code. But finally I had my 100% solution in place but
with code so far out that you don't want to show it to your neighbour
(I could probably make it a little better today). I used not just
REGEX but all sorts of string manipulations, replacement characters,
you name it.

Here is my question:

Have I overlooked some nice new extension function, that might have
appeared since then, that can make a copy of a DTD using XSLT? The DTD
Declaration and the internal subset if it exists?

Or can some REGEX and string manipulation expert, please, show me a
nice and easy way to copy a DTD with XSLT, so I can drop my own
primitive solution.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.