[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Determining the type of attribute within the matching

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
james carlyle
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.