|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Anyone can explain me this syntax?
At 2004-01-13 11:58 -0400, Jaime Stuardo wrote:
>From Muenchian method of grouping, I always use something like this: It is a reference to the current node. why if I omit it, it doesn't work (it returns all elements)? Yes, because the key()[1] expression returns one node and you are asking if the count is 1. - What's the meaning of the | (pipe)? Union (this is a very basic XPath question ... what problems did you have looking for the definition?). A union of two node sets does not contain duplicates of the same node. If the union of the current node and another node is one, then the other node must be the current node. - What's the meaning of [1]? First in proximity order (for axis expressions) or document order (for path expressions). In this case it is requesting the first in document order. While redundant in XSLT 1.0 it is not redundant in XSLT 2.0. I have always used things like [FIELD_NAME=some_value]. I understand that perfectly, but what about placing only that number in the brackets? I tried by using [2] and it worked too... or, perhaps I was lucky? You were lucky. If any of your unique values had only one member, it would have returned the empty set, the count of the union would be one, and it would have triggered ... so it would have worked but not for the reason the expression was written. I hope this helps. ............................. Ken
G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) ISBN 0-13-065196-6 Definitive XSLT and XPath ISBN 0-13-140374-5 Definitive XSL-FO ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath ISBN 1-894049-11-X Practical Formatting Using XSL-FO Member of the XML Guild of Practitioners: http://XMLGuild.info Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








