Subject: Determining the type of attribute within the matching template
From: "James Carlyle" <james.carlyle@xxxxxxxxxxxx>
Date: Sat, 8 Feb 2003 13:26:24 -0000
|
Hi
I have a template that catches all element and attribute nodes
<template match="*|@*">
<choose>
<!-- string literal objects -->
<when test="self::text()[normalize-space(.) != '']">
</when>
<!-- resource types -->
<when test="self::@rdf:resource">
</when>
<!-- datatypes -->
<when test="self::@rdf:datatype">
</when>
<!-- complex objects -->
<when test="self::*">
</when>
</choose>
</template>
This gives an error with the test self::@rdf:resource
"NodeTest expected here. self::-->@<--rdf:resource"
Is there any way of picking up all attributes in a template and then
determining their type, without a comparison of name() and namespace-uri(),
which feels wrong? This is bugging me.
Many thanks if you can help
James Carlyle
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- RE: XPath question, (continued)
- Ross Ken - Mon, 3 Feb 2003 17:57:31 -0500 (EST)
- cknell - Tue, 4 Feb 2003 10:36:08 -0500 (EST)
- cknell - Tue, 4 Feb 2003 11:24:27 -0500 (EST)
- James Carlyle - Sat, 8 Feb 2003 08:23:59 -0500 (EST) <=
- David Carlisle - Sat, 8 Feb 2003 10:05:50 -0500 (EST)
|
|