Well, I’ve done some quality bonding with my XSLT book over the past few days, and I think that it may have scarred me for life. As we were putting up the Christmas tree today, I couldn’t help but see it as a great, big, XSLT metaphor… trunk = document element, roots = root element, branches = nodes with more branches and leaves, needles = nodes without children. Needless to say, my family now officially thinks that I’m nuts…not that they hadn’t already figured that out.
In any event, while I was in the process attempting to play catch-up and working through the book, a few things came up that I have questions about…
1) My first question is probably very basic, but nevertheless I continue to struggle with grasping the notion. Repeatedly, the book refers to the current node, but, I am confused as to what determines it? Is it just whatever element that you’re telling the template to match on? It also seems that there is a second current node when dealing with XPath expressions. On page 74, the book comments “the current node of these select patterns is not the same as the current node of the template rule’s match pattern.” Is the main idea that the current node, in whatever context it is being used, is just a starting point for the processor to begin reading the tree?
2) My second question has to do with XPath. I understand that the general formula for a location step is axis::nodetest[predicate]. Is it a correct assumption to make that you must understand what the entire tree looks like in order to know what axis to list in the formula? Or, should I be thinking of this in terms of the axis relative to the current node, in which case the only thing I would need to know is the relationship of the selected nodes relative to the current node?
3) Thirdly, as I was reading the section about template rules, I started wondering what purpose the xsl:copy template serves in real life. I understand that its primary function is to carry over the element tags, but what practical use does this ever serve in a business sense? Can someone supply me with an example when you would not want the content information and just the tags?
Norwegian Government Campaign Against Drugs buy esomeprazole
No prescription is needed! Worldwide delivery.
http://www.ilijastolica.com/ - nexium 20 mg
Posted by: GorsAtmorry | March 23, 2011 at 10:56 AM
awaisceta http://blasiannicole.net/ - generic zyban Wellbutrin and/or Zyban is very effective, but it is commonly associated with some side effects that may or may not be well tolerated. http://blasiannicole.net/ - zyban bupropion
Posted by: awaisceta | September 21, 2011 at 03:46 AM
awaisceta http://www.frenchquarterstatesboro.com/ - ambien for sale Talk with your doctor about a sleep medication like Ambien. http://www.frenchquarterstatesboro.com/ - generic ambien online
Posted by: NeagsSixseefe | September 23, 2011 at 03:46 AM