Subject: RE: [xsl] Apply-templates - how to omit top level element tags? From: "Mike Schinkel" <mikes@xxxxxxxxx> Date: Thu, 8 Sep 2005 15:30:50 -0400 |
>> Are the examples in the spec not to your liking? It isn't whether I like them or not, it's whether I can understand them easily. The problem is they explain in words but not in examples. So, for example: "* selects all element children of the context node" ". selects the context node" "{no explicit definition of node()}" But no: Given <Make><Name>Honda</Name><Model><Name>Civic</Name></Model><Model><Name>Ac cord</Name></Model></Make> then "*" refers to.... "." refers to.... "node() refers to... And so on. (No need to give me the answer to this specific example as it wouldn't be anywere near all use cases.) To understand http://www.w3.org/TR/xpath requires you to understand the terms in the way they are used, which for a newbie, requires chicken-or-egg logic. Examples help the newbie learn the context in which the terms are applies so that they can they learn the subject which the terms are used to describe. Just an observation, but I think one reason XSLT has not taken off more than it has is because it is so difficult to learn, and my intuition tells me that is shouldn't have to be that difficult but the terms used to describe things and the required mental model are not easy to pick up, so many people don't. For example, my editorial team for http://www.howtoselectguides.com/ is pushing me to drop the use of XML publishing and move to publishing in Word. Doing that will kill my ability to use the content in numerous contexts, but because XML/XSLT is so difficult for the laymen, I may be forced to. -Mike P.S. Does anyone know a really good WYSIWYG editing tool that doesn't get in the way but still supports editing XML to a schema? We can't seem to find one... -----Original Message----- From: Jon Gorman [mailto:jonathan.gorman@xxxxxxxxx] Sent: Thursday, September 08, 2005 12:00 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] Apply-templates - how to omit top level element tags? > Unfortunately, I still don't grok the difference between: > > * > . > node() > > What I'd like to see is example showing all the potential differentuse cases of each of the three and what they output, but I can't find that concisely in any of the books or websites I've looked at. I guess I'll just have to set aside several hours and do it myself. Are the examples in the spec not to your liking? http://www.w3.org/TR/xpath, section 2, 2.5 seems to have the best descriptions. If these aren't helping you, perhaps someone might be able to give you some you like better. What books are you using? There was a thread recently about good books for beginners to pick up, searching the archives should turn them up. Jon Gorman
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Apply-templates - how to , Jon Gorman | Thread | RE: [xsl] Apply-templates - how to , Wendell Piez |
RE: [xsl] Apply-templates - how to , Mike Schinkel | Date | RE: [xsl] nodelist not recognised, Michael Kay |
Month |