Subject: Re: [xsl] Need Help From: Brant Schroeder <brantschr@xxxxxxxxx> Date: Fri, 8 Dec 2006 13:50:09 -0800 (PST) |
Charles, this is one of my problems. I don't know how to distinguish if a node is selected or not. I could generate a parameter on the ASPX page but I don't know how to get it into the XSLT. I have been playing around with this for several days and I am totally stumped so if anyone has any ideas please let me know. Also are there any really good books on XSLT that you might recommend? Thanks Brant ----- Original Message ---- From: "cknell@xxxxxxxxxx" <cknell@xxxxxxxxxx> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Sent: Friday, December 8, 2006 11:43:56 AM Subject: RE: [xsl] Need Help > I am very new to t=his and am having a lot of trouble. That's not unusual when learning something new. > Is this possible? Yes. > Also I would like to apply CSS Classes to certain nodes depending if they are selected or not. There is nothing, so far as I can see, in your XML that gives a clue as to whether or not a node is selected. If you can tell us how to distinguish the selected nodes from the nodes that are not selected, someone will surely explain how to make two templates that match the "item" element, one that adds the "class" attribute for selected nodes, and one that does not. > And can I hide child nodes if the p=arent node is not selected? See answer above. > I am using ASP.Net 2.0 to do this ... This is almost certainly irrelevant to the XSLT transformation. You can use Microsoft's own XSLT transformer, or you could use Saxon.NET, and probably several others as well. Generally speaking, you seem to have several distinct concerns entwined in your thinking. This is not unusual when a person is new to a body of knowledge. Start by explaining how you can tell which nodes are selected and which are not. -- Charles Knell cknell@xxxxxxxxxx - email -----Original Message----- From: Brant Schroeder <brantschr@xxxxxxxxx> Sent: Fri, 8 Dec 2006 11:06:28 -0800 (PST) To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] Need Help I am trying to create a 3 tier menu using xml and xslt. I am very new to t=his and am having a lot of trouble. Here is my XML: <?xml version "1.0" encoding "UTF-8" ?> <menu> <item url="#" title="Home"></item> <item url="#" title="My Stuff"> <item url="#" title="Backgrounds"></item> <item url="#" title="Flyers" ></i=tem> <item url="#" title="Posters" ></item> </item> <item url=="#" title="Portfolio"> <item url="#" title="Backgrounds" ></i=tem> <item url="#" title="Flyers" ></item> <item url="#" title="Posters" ></item> <item url="#" title="More Information"> <item url="#" title="Resume"></item> <item url="#" tit=le="Contact Me"></item> </item> </item> </menu> I want to transform it to this <ul> <li><a href="#">Home</li> <li><a href="#">My Stuff <ul> <li><a href="#">Backgrounds</li> <li><a href="#">Flyers</li> <li><a href="#">Posters</li> </ul> </li> <li><a href="#">Portfolio <ul> <li><a href="#">Backgrounds</li> <li><a href="#">Flyers</li> <li><a href="#">Posters</li> <li><a href="#">More Information <ul> <li><a href="#">Resume</li> <li><a href="#">Contact Me</li> </ul> </li> </ul> </li> </ul> Is this possible? Also I would like to apply CSS Classes to certain nodes depending if they are selected or not. And can I hide child nodes if the p=arent node is not selected? Any help would be appreciated. I am using ASP.Net 2.0 to do this and it is for site I would like to use to display my school work and resume. If it can't be done that is fine I wanted a dynamic menu using XML. Thanks Brant _____________________________________________________________________________ _______ Any questions? Get answers on any topic at www.Answers.yahoo.com. Try it now. --~------------------------------------------------------------------ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/ or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx> --~-- __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Need Help, cknell | Thread | Re: [xsl] Need Help, Brant Schroeder |
RE: [xsl] empty row between types, Michael Kay | Date | [xsl] displaying a flat logfile, chun ji |
Month |