Select unique nodes based on a combination of two attribute values?

This stylesheet: Output: If you have no interest into checking if there is such Document or Person @id, then this stylesheet: Output.

Good and elegant. (+1). I came up almost with the same.

– Dimitre Novatchev Aug 26 '10 at 1:23.

You can combine multiple selector attributes into the XPath query, doesn't have to be just a single attribute=value pair. stackoverflow.com/questions/353843/find-....

You need to filter the s with something like this, where the current() function returns s you're checking for uniqueness. . Not(preceding-sibling::Link@personId = current()/@personId and @documentId = current()/@documentId) The preceding-sibling:: axis is used to find earlier elements and the part in square brackets checks for matching ID numbers.

The not() wrapping the whole expression means the entire bracketed expression is true only if NO such preceding sibling matches, i.e. There is no prior with the same person and document IDs. My XSLT knowledge is rusty so I'll leave that part to you.

What I'm thinking is you first find all links with, say, //Link, and then filter them in a second step with the above XPath. I tried hard but couldn't think of any way to do it all in one step since this relies on the current() function to work.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions