xsl-list
[Top] [All Lists]

Re: [xsl] Namespace(?) question

2007-03-07 07:45:49

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.

David

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>