Subject: Re: [xsl] enclosing attribute in single quote From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Mon, 27 Apr 2009 17:52:35 -0400 |
On 21 Apr 2009, at 16:48 , Wendell Piez wrote:I take it the recipient of the data knows that by requiring XML with only single quotes used as attribute value delimiters, they are asking for XML-that-is-not-XML?
Well, that's kind of harsh, isn't it? XML does allow single quotes to be used, so <a x='y'/> is every bit as much a conforming XML document as <a x="y"/>.
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.
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.
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] enclosing attribute in si, C. M. Sperberg-McQue | Thread | [xsl] in search for more elegant XP, Huditsch, Roman \(LN |
RE: [xsl] How to cast current-group, Michael Kay | Date | [xsl] GROUPING AND KEYS, Cleyton Jordan |
Month |