|
|
 |
| 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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

October 10th, 2008, 09:24 AM
|
|
Authorized User
|
|
Join Date: Jan 2007
Location: durban, Africa, South Africa.
Posts: 89
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
.Net2 xslt does not like the < "<" - > ">"
Hi, I need help please.
Update system to to new version & moved on to .Net2
But now my code that worked in my .Net1 xslt does not work.
.Net1 fine:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:asp="remove" xmlns:igchart="remove" xmlns:igsch="remove">
<td class='rowDet' id="td_<xsl:value-of select='@name' />">
.Net2 don't work:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:asp="remove" xmlns:igchart="remove" xmlns:igsch="remove" xmlns:igtxt="remove">
<td class='rowDet' id="td_<xsl:value-of select='@name' />">
I had to change it back to: <td class='rowDet'>
Is there a new code for the "<" ">"?
Please Assist!
Regards
|

October 10th, 2008, 09:39 AM
|
|
Friend of Wrox
|
|
Join Date: Nov 2007
Location: Germany
Posts: 655
Thanks: 0
Thanked 98 Times in 97 Posts
|
|
What exactly do you want to achieve?
It is not clear where exactly you have those entity references like < and why you think you need them.
It is also not clear what error message exactly you get. Please tell us exactly what you have tried and which error message exactly you get.
--
Martin Honnen
Microsoft MVP - XML
|

October 10th, 2008, 09:40 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 1,359
Thanks: 0
Thanked 31 Times in 31 Posts
|
|
Creating elements in the output XML (or tat least trying to) using < and > is generally a 'bad thing' due to the way different processor handle things.
Try doing this instead:
Code:
<td class="rowDet">
<xsl:attribute name="id">td_<xsl:value-of select="@name"/></xsl:attribute>
</td>
/- Sam Judson : Wrox Technical Editor -/
|

October 10th, 2008, 11:03 AM
|
 |
Wrox Author
Points: 12,735, Level: 48 |
|
|
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 3,923
Thanks: 0
Thanked 82 Times in 80 Posts
|
|
Neither text nodes (<) nor instructions like xsl:value-of are allowed as direct children of xsl:stylesheet, so neither of these should work. But perhaps you left out some levels of structure. But I would need to see those levels to see whether your your code is valid XSLT or not.
Whether valid or not, it's not good coding style. You want to be using attribute value templates:
<td class="rowdet" id="td_{@name}">
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer's Reference
|

October 11th, 2008, 05:40 AM
|
|
Authorized User
|
|
Join Date: Jan 2007
Location: durban, Africa, South Africa.
Posts: 89
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Hi All, Thank You very much.
I don't know xml at all, all I did to the xslt file before the upgrade was to edit/add some code.
I needed to get the id of the description so that on mouseover my object i want to change the background color of the TD.
This worked:<xsl:when test="Attributes[ @name='visible'] != 'False'">
<td width='15%' align='right' class='rowDet'> <xsl:attribute name="id">td_<xsl:value-of select='@name' /></xsl:attribute>
Thank You all for your kindness & knowledge!
Regards
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |