enpysoft schrieb:
Hi Experts,
I have to get the list of the distinct attribute values
across different node level.
Finding unique values is an application of grouping, and grouping in
XSLT 1.0 is usually done using a technique called "Muenchian grouping".
Googling for that should yiel
The code works for me (after fixing a syntax error so the scriptreport
was valid xml).
Output produced:
Demo Application
Test login
It seems there is something wrong with your setup - not your code
Best regards,
Christoffer Dam Bruun
enpysoft skrev:
Hi Chris,
I her
/>
>>>> <case name="rajesh" status="B.Com" />
>>>>
>>>>
>>>> <case name="ramesh" status="Law" />
>>>>
>>>>
>>>>
>>>
>>>>
>>>>
>>>>
>>>> Now i have to get only the values as ramesh and rajesh and i should not
>>>> get
>>>> ramesh two times. As i use only XPATH 1.0 and XSLT 1.0 i cannot use
>>>> distinct-values function. I earlier tried using to fetch distinct
>>>> values
>>>> to
>>>> a variable using the below script in xslt and it is not working.
>>>>
>>>> >>> select="/validation/report/script/case[not(@name=predicate-sibling::validation/report/script/case/@name)]/@name"
>>>> />
>>>>
>>>> The above code snippet is not working. Kindly let me know what has to
>>>> be
>>>> done to get my expected output.
>>>>
>>>>
>>>> thanks in advance,
>>>> npselvan
>>>>
>>>>
>>>
>>>
>>
>>
>
>
>
--
View this message in context:
http://www.nabble.com/Selecting-distinct-values-from-different-node-in-XPATH-1.0-tp24717305p24721316.html
Sent from the Xalan - J - Users mailing list archive at Nabble.com.
That kind of errors are never nice
If the problem is that set:distinct is returning a resulttree-fragment then
it might help wrapping the variable in common:node-set() before using
it e.g.;
http://www.w3.org/1999/XSL/Transform";
version="1.0"
xmlns:common="http://exslt.org/common";
riable using the below script in xslt and it is not working.
>>
>> > select="/validation/report/script/case[not(@name=predicate-sibling::validation/report/script/case/@name)]/@name"
>> />
>>
>> The above code snippet is not working. Kindly let me know what has to be
>> done to get my expected output.
>>
>>
>> thanks in advance,
>> npselvan
>>
>
>
>
--
View this message in context:
http://www.nabble.com/Selecting-distinct-values-from-different-node-in-XPATH-1.0-tp24717305p24719834.html
Sent from the Xalan - J - Users mailing list archive at Nabble.com.
Hi Npselval,
Is it impossible for you to use the exslt.org extensions (they are part
of xalan you should just declare the namespace).
They contain an implementation of the distinct function. Example:
http://www.w3.org/1999/XSL/Transform";
version="1.0"
xmlns:set="http://exslt.org/sets";>
this message in context:
http://www.nabble.com/Selecting-distinct-values-from-different-node-in-XPATH-1.0-tp24717305p24717305.html
Sent from the Xalan - J - Users mailing list archive at Nabble.com.