[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XML/XSLT reading
> I suppose my question would now be, what advantage does XML/XSL have > over an XML (or tab separated list) and a Perl script in this example. Processing XML directly with a perl script (that is, without an XML parser) is error-prone. There's a tendency to rely on things you shouldn't rely on, such as namespace prefixes, or the fact that there's no whitespace around the "=" in attributes, or the fact that you won't find the string "<abc>" in the content of a text (CDATA) node (or a comment), or the absence of external entities. There's a tendency to say "I know these things won't appear in my data", which means that you're not actually handling XML, you're handling some private (and probably undocumented) subset of XML. When writing XML there's a tendency not to escape everything that should be escaped. There's also (in my experience, but I may only have seen badly-hacked Perl code) a tendency to write code that's very inefficient compared with a real XML parser. On the other hand, a Perl solution using a real XML parser is probably quite viable. Doing this application in XSLT for the rendition side and Perl for the editing side might be the best approach overall. Michael Kay http://www.saxonica.com/
|
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
|