[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|