21 Nov 2003 09:55
Another reason why XSLT uses XML syntax
Nic Ferrier <nferrier <at> tapsellferrier.co.uk>
2003-11-21 08:55:29 GMT
2003-11-21 08:55:29 GMT
While out with the dog on a rainy night I thought of the obvious reason why XSLT is in XML syntax (I think this is one of the official design reasons, it's just that I forgot it). It's in XML because it generates XML. It means the language is simpler to implement because, as an implementor, you don't need to implement the XML infospec and validation rules... an XML parser does it for you. When the XSLT engine sees an XSLT script it can gaurantee that it is well-formed (otherwise the parser would have complained about loading it). That's half the battle with a complex template language. The XML syntax also allows namespaces and all that guff to be specified in a naturalistic way. So, even thought it sucks from an authors point of view, there is a good reason for it. Btw I've always thought that XML syntax was pretty poor for authors. Whenever I write anything substantial I use GNU's Texinfo format and then convert it to XML (there are tools for that). Texinfo is a markup language inspired by TeX and it's much easier to write lots of than XML is. Nic ------------------------ Yahoo! Groups Sponsor ---------------------~--> Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark(Continue reading)
RSS Feed