xsl-list
[Top] [All Lists]

RE: [xsl] Namespace-alias using #default with no default namespace in scope

2006-05-12 03:11:31
Hi, 

-----Original Message-----
From: David Carlisle [mailto:davidc(_at_)nag(_dot_)co(_dot_)uk] 

  Ah! Is a more recent version of the XSLT 2.0 spec available
  somewhere? I'm currently reading http://www.w3.org/TR/xslt20,
  which says: "W3C Candidate Recommendation 3 November 2005".

as it says at the top of (all) w3c working drafts the 
"undated" URI such
as http://www.w3.org/TR/xslt20 is always the most recent version (and
updated in place) when newer versions are published. The URI for a
particular draft is always of the form

http://www.w3.org/TR/2005/CR-xslt20-20051103/

which will always refer to the CR draft even if a later draft is
published.

OK. It would be interesting for me to see how the spec evolves.
I guess there is a document which is kept up-to-date, but accessible
only to W3C-members, right?

I already searched the spec for something like "#none" to be
specified if one wants to move elements from/to no namespace.
Using a "#none" would be clearer in my opinion; additionally
safer, since, if stylesheets are generated by e.g. multiple
transformation steps, one might not know at the end if a
transformation step hasn't decided to generate a default
namespace declaration on a relevant element like xsl:stylesheet;
thus a "#default", originally intended to refer to no namespace,
might incorrectly refer to an existing default namespace in the end.


It's only the bindings that are in scope on the xsl:namespace-alias
element that matter to namespace-alias (as far as resolving which
namespace #default refers to).

Yes.
What I was referring to is a scenario, where stylesheets are
itself the result of a chain of transformations. You have total control
over the stylesheet you write, but you might not have total control
over what ns-declarations were added to result trees.

Couldn't there be a rule, or at least a suggestion in XSLT 
2.0 to use
either the literal namespace prefix or the target namespace prefix?

xslt2 is a more explict here. the rules imply (and the following note
makes explict) that the stylesheet-prefix is not used in the result.

   These rules achieve the effect that the element generated from the
   literal result element will have an in-scope namespace 
node that binds
   the result-prefix to the target namespace URI, provided that the
   namespace declaration associating this prefix with this 
URI is in scope
   for both the xsl:namespace-alias instruction and for the 
literal result
   element. Conversely, the stylesheet-prefix and the literal 
namespace URI
   will not normally appear in the result tree. 

David

Great! That's good news.

Thanks & regards,

Kasimier

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--