|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
||||
|
||||
|
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> |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
||||
|
||||
|
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 |
|
#4
|
||||
|
||||
|
<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 - |
|
#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" /> |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > XML + XSL problem with spaces! gag |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|