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:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old November 28th, 2003, 07:49 AM
RogueGunner's Avatar
RogueGunner RogueGunner is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 64 RogueGunner User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 sec
Reputation Power: 5
XML + XSL problem with spaces! gag

I currently have the following xml document
I am using a xsl document to display it however when i go to display ladder name it doesn't work - i know you can't have spaces - but i have no control over it seeing how it is on another server. How would i display the value for ladder name using the xsl document.

<code>
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <team>
- <teaminformation>
<name>MavCom</name>
<url />
<email>shawn_mccrea@telusplanet.net</email>
<irc channel="mavcom">gamesnet.net</irc>
<status>Active</status>
<founder>=Typhon=</founder>
<description />
</teaminformation>
- <competitioninformation>
+ <ladder name="CoD: North America - Retrieval 4v4">
</competitioninformation>
</team>
</code>

Reply With Quote
  #2  
Old November 28th, 2003, 09:29 PM
tsprings tsprings is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Seattle, WA
Posts: 55 tsprings User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 20 sec
Reputation Power: 5
RogueGunner, why don't you post the relevant code for XML and your XSL so we can see exactly where you're having problems?
__________________
T. Springs

Reply With Quote
  #3  
Old November 28th, 2003, 10:09 PM
RogueGunner's Avatar
RogueGunner RogueGunner is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 64 RogueGunner User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 sec
Reputation Power: 5
In my xsl file everything will transform fine except for

<xsl:for-each select="/team/competitioninformation/ladder name">


CODE:
<xsl:for-each select="/team/competitioninformation/ladder">
<xsl:for-each select="/team/competitioninformation/ladder name">
<a href="{ladderlink/httplink}">
<xsl:value-of select="/team/teaminformation/name" />
</a>
<xsl:value-of select="rank" />
</xsl:for-each>
ENDCODE

There is a space inbetween

The complete xml file is here:
http://www.teamwarfare.com/xml/view...asp?team=MavCom

I want to display the value for "ladder name"
but xsl won't let u use spaces in the tag names - this isn't my xml file so i can't edit it - however, they are using it somehow.

so my question is how do i display the value for "ladder name"

thanks in advance

Reply With Quote
  #4  
Old November 29th, 2003, 01:12 AM
RogueGunner's Avatar
RogueGunner RogueGunner is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 64 RogueGunner User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 sec
Reputation Power: 5
<ladder name="CoD: North America - Retrieval 4v4">
Okay in the element "ladder" there is an attribute "name"

how do i display the value of this attribute "name" using xsl style sheet -

Reply With Quote
  #5  
Old November 29th, 2003, 01:34 AM
RogueGunner's Avatar
RogueGunner RogueGunner is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 64 RogueGunner User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 sec
Reputation Power: 5
i figured it out after about a day of searching
Say that your data is

...
<ladder name="CoD: North America - Retrieval 4v4">
</ladder>
...

You can access ladder by

<xsl:value-of select="ladder/@name" />

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XML + XSL problem with spaces! gag


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 4 hosted by Hostway