Re: [xsl] Namespace(?) question

Subject: Re: [xsl] Namespace(?) question
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 7 Mar 2007 14:24:14 GMT
> I was thinking (hoping?) that
> XSL would handle the namespace resolution automatically, 

for element and attribute names, yes but an XSLT 1 processor has no idea
that the pfx:ChildClass in type="pfx:ChildClass" is a QName to which
namespace resolution could be applied. Attribute values, like element
content, are just strings, essentially.

If you know that you ony refer to the target namespace you could test
against substring-after(@type,':')

alternatively if you use a schema-aware XSLT2 implementation and use the
schema-for-schemas that would (presumably) tell the system that
xs:element/@type was an attribute of type QName and then things would
work differently....

Incidentally whenever you have //anything=something, consider using an
xsl:key as that is specifically designed to optimise such expressions.


Current Thread