Altova Mailing List Archives


Re: [xsl] Q: to Jeni Tennison regarding your APress titles...

From: "M. David Peterson" <m.david@---------->
To:
Date: 11/26/2004 9:20:00 PM
Hey Jeni,



Sorry for the late reply!  Was out yesterday for the holiday event here 
on the other side of the pond. :)



Jeni Tennison wrote:



Hi David,



You mean "foo[number(@bar)]" (which selects the <foo> element children

of the current node whose bar attributes match their position amongst

other <foo> elements within the current node) or, more feasibly,

"foo[number(current()/@bar)]" (which selects the nth <foo> element

child of the current node where n is the value of the bar attribute of

the current node).

 



Hmmm... I'm not sure I understand.  The way I interpreted what David 
Carlisle had stated was that, for example, if @bar had the value of "5" 
that you could use then use the number function to tell the XSLT 
processor to use the literal number value of @bar to determine the 
position of an element in relation to the document order of an element 
in relation to its siblings.  Is that how it is or did I misinterpret 
what David was saying?




Right -- that's part of why I tend to advise people to use matching

templates with modes rather than named templates: with a matching

template, you have some hope of knowing what the context node is by

looking at the pattern, with a named template you can't tell without

finding the call to that template, which makes debugging that much

harder.

 



Ah yes, very good advice.  In fact I have found that the only time I 
even use named templates anymore is for recursively seeking out 
particular content within a string and processing it further or as a way 
to specify the number of times the named template should be called and 
the instruction set processed before moving forward.  And even then I 
try to make minimal use of this type of processing for the simple fact 
that if used in the wrong situation you can find yourself spending a lot 
of CPU cycles and bottleneck an entire application because of it.




I'll certainly try to pop in.

 



That would be great!  I know that we would all appreciate any further 
insight you have on particular topics.  We are going to use Dr. Kay's 
XSLT and XPath (1.0 and 2.0) Programmer References as a way of further 
referencing a topic. But to have your insight to further understand a 
topic of interest would be invaluable and an outstanding asset to the 
project.




No; a link to Amazon is fine.

 



Great, I will leave it as is then.



Thanks again Jeni!  I've added a couple of entries on the site today, 
one which is specific to copyrights and the policy I will be 
implementing when it comes to anything that could be construed as a 
copyright infringement.  If you have a chance to take a look at the 
policy and have anything additional you would like for me to consider, 
please let me know.  The last thing I want to have happen is to infringe 
upon copyrights and will be making a specific effort to not use the 
literal text from the book beyond simple quotes and, of course, all of 
these will be properly marked and attributed.  I will be asking for 
those who make comments to follow these same guidelines and I will be 
monitoring conformance, deleting anything that could even possibly be 
considered an infringement.  If at anytime you see anything on the site 
that I have missed that you or APress feel a bit uneasy about please let 
me know and I will make sure it is taken off the site immediatelly!



Cheers!



<M:D/>



Cheers,



Jeni



---
Jeni Tennison
http://www.jenitennison.com/

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.