Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 19th, 2007, 02:23 AM
Authorized User
 
Join Date: Feb 2007
Location: , , .
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default check a attribute

hi..suppose in my xml, node1 one has a attribute called "Info"...now i want to get all the attribute name and value expect for the Info..mens if attributename equals "Info" i will not process it to get the value ..i want to ignore it..and i have to check if this attribute is exist or not..if exist then only i can ignore it...what will be syntax..

and suppose i got a attibute value ..and i want to break it by some key work like"#10;" if i get this in the attribute value ..i want to break the string attribute value by parts...what will be the sytax..
can anybody pls help me with the syntax..thnx
Reply With Quote
  #2 (permalink)  
Old February 19th, 2007, 04:27 AM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

1.

In XPath 2.0: "@* except @Info"

In XPath 1.0: "@*[local-name() != 'Info']"

2. Use functions like substring-before() and substring-after()

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote
  #3 (permalink)  
Old February 19th, 2007, 04:43 AM
Authorized User
 
Join Date: Feb 2007
Location: , , .
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

cool..that's working fine....thank u very much...

for the spliting thing....suppose
<xsl:for-each select="@*">
                       <tr height="22"><td class="nodeprop">
                       <xsl:value-of select="name()"/>
                       </td><td class="nodevalue">
                      <xsl:value-of select="."/> #160;
                      </td></tr>
                </xsl:for-each>


here i'm getting one attribute value like this......
&amp;#10;-- 12.08.97 K.W&ouml;rn - Neue Felder aufgenommen Tarifart, Bewertungsstichtag&amp;#10;-- 16.12.02 T. Loeken - CHR 7614: TrgPreUpdate TAR, Verkn&uuml;pfung korrigiert&amp;#10;-- 10.01.03 T. Loeken - CHR 7402: Vertikale Ausrichtung der

now i need to split it when ever i will get &amp;#10;..
so for that i need to store the value first then i have to split and display...but with the 'substring-before' and 'substring-after' i can only split the value in two part..may be..do i have to do a recursion..could u pls tell me how to store the value and how to do recursion...with the syntax those r very new to me...thnx

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Replace an attribute with another attribute georgemeng XSLT 8 June 10th, 2008 11:04 AM
Connect to VSS check-in Check-out Programatically rhd110 General .NET 6 August 12th, 2007 07:46 AM
How to check for the presence of an attribute dsekar_nat XSLT 2 July 27th, 2006 05:04 AM
Access to attribute values from class of attribute jacob C# 1 October 28th, 2005 01:11 PM
Help 'Check ListView' vs 'Check ListBox' MikeY C# 1 February 24th, 2005 02:20 PM



All times are GMT -4. The time now is 08:16 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.