Re: [xsl] XSL template "namespace" problem

Subject: Re: [xsl] XSL template "namespace" problem
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 29 Mar 2006 15:03:41 -0500
At 02:12 PM 3/29/2006, Jon wrote:
I'd be surprised to find any processor supporting this:
<a href="<xsl:value-of select='foo' />">some link</a>. If you can find
one, post a small test case sample and report the bug to the
developers.

This is quite unlikely (Jon would be justified in his surprise) because developers would probably have to go to extra trouble to support a "feature" which breaks both the letter of the XML Recommendation, and all current interpretations of XML. An XSLT stylesheet is an XML document instance, which any XML parser can parse. The above doesn't parse as XML.


The bug you reported here would be a bug in the XML parser that is applied to the stylesheet prior to its being applied, since that's the component that enforces well-formedness (i.e. syntax) rules like "no tags in attribute values" (the rule is actually stricter: no unescaped "<" characters at all). It would be interesting to hear any XML developers (of XSLT engines or other) try to make the case that subverting XML's stated rules regarding its "Draconian error handling" of such illegal constructs is a good idea. (There are actually application scenarios where it might be defensible -- but XSLT isn't one of them.)

This is why it's possible for experienced practitioners to look at this and say authoritatively "there's no way this could work". We don't have to try it since the XML parsers installed in our brains tell us it's a no-go.

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