ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> visual-xslt-discuss
visual-xslt-discuss
RE: [Visual-XSLT-discuss] how to indicate attribute
by Stuart Celarier other posts by this author
Feb 10 2003 5:57PM messages near this date
view in the new Beta List Site
[Visual-XSLT-discuss] how to indicate attribute | [Visual-XSLT-discuss] Visual Studio 2003 Beta
Andrew, here is a fragment that should get you going in the right
direction.

<xsl:template match="defaults"> 
  <xsl:for-each select="@*"> 
    ...

    <!-- name of the current node (attribute),
         see also local-name() and namespace-uri() --> 
    <xsl:value-of select="name()"/> 

    <!-- value of the current node (attribute) --> 
    <xsl:value-of select="."/> 

    ...
  </xsl:for-each> 
</xsl:template> 

See [1] for more details.

Cheers,
Stuart

[1] http://www.w3.org/TR/xpath#section-Node-Set-Functions

-----Original Message-----
From: visual-xslt-discuss-admin@[...].com
[mailto:visual-xslt-discuss-admin@[...].com] On Behalf Of
Watts, Andrew C
Sent: Thursday, February 06, 2003 11:35
To: ActiveState Visual XSLT List (E-mail)
Subject: [Visual-XSLT-discuss] how to indicate attribute

The first line returns to me the number of attributes,
but how do I specify their names & values without
explicitly naming them as in   <xslt:value-of select= "@path"/> 
<xslt:value-of select= "@[0]"/>    // does not work - but
from what I read should point to the first attribute....

Thanks..Andrew

<xslt:for-each select ="defaults"> 
		<xslt:value-of select= "count(@*)"/>  
	    <xslt:value-of select= "@[0]"/>     
_______________________________________________
Visual-XSLT-discuss mailing list
Visual-XSLT-discuss@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Watts, Andrew C
Stuart Celarier

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved