[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: enclosing attribute in single quote
On 21 Apr 2009, at 16:48 , Wendell Piez wrote:
If memory serves, ISO 8879 referred to rules of this kind as "application conventions". So they have always been part of the story of generic markup. And while those of us who work day to day with XML-based tools may regard it as unnecessary, a convention of this kind can make things easier for the desperate Perl hacker. The DPH can often exploit knowledge of regularities in the data at hand to get by with less effort than would otherwise be necessary. (In my work with the XML Schema spec, for example, I routinely exploit the fact that I know that all attributes use double quotes to simplify search and replace expressions in my editor. It's not Perl, so I'm not really a DPH. Call me a desperate ELisp hacker.) Frankly, if the naming and design rules for prominent XML vocabularies can require the use of specific namespace prefixes for specific namespaces, and expect to elicit conformance instead of incredulous laughter, well, then I guess application conventions are alive and well and living among us. (I confess that my response was incredulous laughter, but that didn't persuade them to change the rules.) There may well be SAX serializers which accept an invocation-time parameter to prefer single quotes when emitting attribute values (I've never looked so I don't know). If there aren't, it really shouldn't be too very hard to write one, to pair it with a SAX parser, and to put together a filter that will normalize any XML input by emitting it with single quotes only around attributes. -- **************************************************************** * C. M. Sperberg-McQueen, Black Mesa Technologies LLC * http://www.blackmesatech.com * http://cmsmcq.com/mib * http://balisage.net ****************************************************************
|
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
|