[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Displaying one section of XML file at a time -- p
Jon, Thanks a lot! I made all the changes you suggested, and it worked in my transformation mode - sending XML with a stylesheet PI to the browser!! > > <cd id="2"> > > Word of warning. > shouldn't start with numbers. I don't think this will > cause an error > necessarily at any point, but it might in some > tools. You are right, although it didn't cause any problem, I did change it to c2 as you suggested. > > <h2> > > <a href='javascript:void(0);' > onClick="toggle('$id')"> > > ^^^^ > I think you're trying to do attribute value > templates. See > http://www.w3.org/TR/xslt#attribute-value-templates. > Remember XSLT > doesn't know anything about the output format. So > if you do this it > will literally put out toggle($id) (view the > generated source). > > > <div style="display:none" id="$id"> > ^^^^^ > And here you assign all the elements the literal id > value $id. Hence > there's a conflict in ids, and browsers will behave > unpredictably. > Most will probably just grab the first element with > that id. Yes, that's what was happening. While IE dispalyed the first table, Mozilla dispalyed the second one. Thanks for pointing me to the documentation on attribute-value-templates again. It helped me solve the problem. > You really do need to make sure you have some way of > viewing the > generated html page. Either using view generated > source via a plugin You mean something like Sarissa, right? That's what I am planning on to do next. > or browser setting Could you please expand on this one? When I send the XMl file with stylesheet PI to the browser, and view the source, I see the XML file. Is there a way to view the transformation by changing the browser settings? > or generating using a stand-alone processor. Yes, planning to download Saxon. > This would have been much easier to notice had you > done this. Couldn't agree more :) I greatly appreciate your help! Regards, Gowri __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|