XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 19th, 2004, 06:39 AM
kw103 kw103 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Chatham, Kent
Posts: 13 kw103 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Attributes /XSL/ XML

Hi everyone,

I am using the following code in a XSL file:

<xsl:for-each select="tables/table" >
<xsl:if select="@name=categories" >

"name" is an attribute in table element. "categories" is a value of "name".

The validator parser is throwing the following error.
Attribute 'select' is invalid on 'xsl:if'.

Is it possible to check the value of an attribute using any of the xsl methods (eg: <xsl:choose > ),

Help really appreciated..

Thanks.

Reply With Quote
  #2  
Old March 19th, 2004, 02:25 PM
kw103 kw103 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Chatham, Kent
Posts: 13 kw103 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi,

I think I sort the problem out.. Following is the code I used:
......
<xsl:for-each select="businessRecords/tables/table" >
<xsl:choose>
<xsl:when test="@name='products'">
<xsl:for-each select="record" >
<xsl:choose>
<xsl:when test="category/@cat='C2'">
<tr align="center">
<td align="center">
<xsl:value-of select="product_name" />
.......
It seems that <xsl:if test="@name='products'"> does't allow the use of @.

Thanks,

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Attributes /XSL/ XML


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway