Re: [xsl] Creating HTML and XHTML with one stylesheet with namespace-alias

Subject: Re: [xsl] Creating HTML and XHTML with one stylesheet with namespace-alias
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 02 Sep 2007 20:19:30 -0400
At 2007-09-03 10:04 +1000, Deborah Pickett wrote:
Can someone please confirm if what I'm doing here conforms to the XSLT
1.0 spec?  It seems to crash Xalan-J 2.7.0, but Saxon 6 and MSXML 4 do
what I want.  (XSLT 2.0 clearly states that this works, and indeed Saxon
8 does so.)
Specifically, what I want to know is:
Is is allowed for namespace-alias to map the null namespace in XSLT 1.0?

Section 7.1.1 shows:

<!-- Category: top-level-element -->
  stylesheet-prefix = prefix | "#default"
  result-prefix = prefix | "#default" />

Since only the default namespace can be the null namespace, this looks pretty explicit to me that provision is made for referencing the null namespace. The text reads "the result-prefix attribute specifies the corresponding namespace URI that will appear in the result tree". Granted there is no wording explicitly about the null namespace, but I would think any conformance would not preclude it being supported since the specification doesn't explicitly constrain the URI for the default namespace.

And, anyway, Saxon is so very (very!) rarely wrong. I've relied on 6.5.5 for a lot of production XSLT 1.0 work and always use it in my classroom, and the latest Saxon for the XSLT 2.0 exercises.

I hope this helps.

. . . . . . . . . . . Ken

-- Upcoming public training: XSLT/XSL-FO Sep 10, UBL/code lists Oct 1 World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and training G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Jul'07 Legal business disclaimers:

Current Thread