RE: [xsl] help on attribute name

Subject: RE: [xsl] help on attribute name
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 25 May 2005 18:20:13 -0400
Raman,

At 06:01 PM 5/25/2005, you wrote:
The attribute name I really want is 35 and NOT T35.

Ah, well that's a problem then.


"35" is not a legal name, for an element, attribute, or (DTD-typed) ID value, in XML.

Other than that, I see no problems with your code, and indeed your general approach is quite sound. Do any of your troubles persist when you call the attribute T35?

When I attempted that I got a lot
of errors and I simply stuck a T in front which I will
strip in a downstream process.

You could do that, but subsequent parsers should refuse to allow an attribute named "35" in a file that purports to be XML.


The arcane naming rules are part of the SGML legacy in XML. While grandkids often complain about what their grandparents leave to them ("why can't my nose be smaller?"), on the whole the SGML legacy in XML is a good thing. Many design problems and mistakes in XML were simply avoided by adopting SGML best practice.

A legal name, OTH, would be "_35". Go figure.

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