Altova Mailing List Archives


Re: [xsl] sgml to xml

From: "Christopher R. Maden" <crism@-----.--->
To: xsl-list@-----.------------.---
Date: 10/21/2009 8:06:00 PM
a kusa wrote:
> Now I am thinking that I don't have to run this data through any SGML
> -> XML converters can run the transformation on this data as is. I
> still have to modify the DOCTYPE declarations to include SYSTEM
> identifiers vs. PUBLIC.

If the DTD uses SGML syntax, e.g.

<!ELEMENT foo - - (#PCDATA)>

instead of XML syntax, e.g.

<!ELEMENT foo (#PCDATA)>

then the XML parser will choke on it.  You may be better off stripping
the DOCTYPE declarations rather than modifying them to have system
identifiers.  However, if the DTD provides any default attributes, that
may not be an option, so you will still need to do an SGML-to-XML
conversion.  (This last part is relevant to this list; default attribute
values can be a source of surprise to XSLT conversions.  The default
values can be built into the transformation instead, though.)

That said, osx does the job rather nicely; I would just use (and have
used) that.

~Chris
-- 
Chris Maden, text nerd  <URL: http://crism.maden.org/ >
“What a dream life would seem if you could see the world from
 inside an Etch-A-Sketch.” — Andrew Bird, “Tea & Thorazine”
GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319

--~------------------------------------------------------------------
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@l...>
--~--

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.