Given this source XML:\[code\]<Objects> <Object> <Relations> <Relation> <Placements> <Placement> <Page>6</Page> <Element>body</Element> <FrameOrder>3</FrameOrder> <PageSequence>2</PageSequence> <PageNumber>6</PageNumber> </Placement> <Placement> <Page>1</Page> <Element>body</Element> <FrameOrder>0</FrameOrder> <PageSequence>1</PageSequence> <PageNumber>1</PageNumber> </Placement> <Placement> <Page>6</Page> <Element>body</Element> <FrameOrder>4</FrameOrder> <PageSequence>2</PageSequence> <PageNumber>6</PageNumber> </Placement> <Placement> <Page>1</Page> <Element>head</Element> <FrameOrder>0</FrameOrder> <PageSequence>1</PageSequence> <PageNumber>1</PageNumber> </Placement> <Placement> <Page>1</Page> <Element>body</Element> <FrameOrder>2</FrameOrder> <PageSequence>1</PageSequence> <PageNumber>1</PageNumber> </Placement> <Placement> <Page>1</Page> <Element>body</Element> <FrameOrder>1</FrameOrder> <PageSequence>1</PageSequence> <PageNumber>1</PageNumber> </Placement> </Placements> </Relation> </Relations> </Object></Objects>\[/code\]I'm trying to get the distinct \[code\]Page\[/code\] elements, in order, where the \[code\]Element\[/code\] elements are \[code\]body\[/code\]:\[code\]<Pages> <Page>1</Page> <Page>6</Page></Pages>\[/code\]The furthest I seem to get is by using the following XSL:\[code\]<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xslutput method="xml" indent="yes"/> <xsl:template match="/"><xsl:for-each select="Objects/Object/Relations/Relation/Placements/Placement[Element='body']"><xsl:sort select="FrameOrder"/> <Page><xsl:value-of select="Page"/></Page></xsl:for-each></xsl:template></xsl:stylesheet>\[/code\]That gives me:\[code\]<Pages> <Page>1</Page> <Page>1</Page> <Page>1</Page> <Page>6</Page> <Page>6</Page></Pages>\[/code\]How do I get the distinct values of \[code\]Page\[/code\] at this point?Thanks in advance!