|
Subject: [xsl] Unable to select wanted nodes From: "Mark" <mark@xxxxxxxxxxxx> Date: Thu, 6 Oct 2011 13:02:14 -0700 |
Help graciously accepted, Mark
<Input>
<Set>
<Stamp>
<CatNumbers pofis-number="105"/>
<Formats souvenir-sheet="105"/>
<Formats se-tenant="105"/>
</Stamp>
<Stamp>
<CatNumbers pofis-number="106"/>
<Formats souvenir-sheet="105"/>
<Formats se-tenant="105"/>
</Stamp>
<Stamp>
<CatNumbers pofis-number="107"/>
<Formats souvenir-sheet="105"/>
<Formats se-tenant="107"/>
</Stamp>
<Stamp>
<CatNumbers pofis-number="108"/>
<Formats souvenir-sheet="105"/>
<Formats se-tenant="107"/>
</Stamp>
</Set>
</Input>
----------------
<DesiredOutput>
<StampPage>
<FormatButtons>
<Formats state="active" souvenir-sheet="105"/>
<Formats state="active" se-tenant="105"/>
</FormatButtons>
<StampButtons>
<Stamp state="depressed" pofis-number="105"/>
</StampButtons>
</StampPage>
<StampPage>
<FormatButtons>
<Formats state="active" souvenir-sheet="105"/>
<Formats state="active" se-tenant="105"/>
</FormatButtons>
<StampButtons>
<Stamp state="depressed" pofis-number="106"/>
</StampButtons>
</StampPage>
<StampPage >
<FormatButtons>
<Formats state="active" souvenir-sheet="105"/>
<Formats state="active" se-tenant="107"/>
</FormatButtons>
<StampButtons>
<Stamp state="depressed" pofis-number="107"/>
</StampButtons>
</StampPage>
<StampPage>
<FormatButtons>
<Formats state="active" souvenir-sheet="105"/>
<Formats state="active" se-tenant="107"/>
</FormatButtons>
<StampButtons>
<Stamp state="depressed" pofis-number="108"/>
</StampButtons>
</StampPage>
<FormatPage souvenir-sheet="105">
<FormatButtons>
<Formats state="depressed" souvenir-sheet="105"/>
<Formats label="1" state="active" se-tenant="105"/>
<Formats label="2" state="active" se-tenant="107"/>
</FormatButtons>
<StampButtons>
<Stamp label="1" state="active" pofis-number="105"/>
<Stamp label="2" state="active" pofis-number="106"/>
<Stamp label="3" state="active" pofis-number="107"/>
<Stamp label="4" state="active" pofis-number="108"/>
</StampButtons>
</FormatPage>
<FormatPage se-tenant="105">
<FormatButtons>
<Formats state="active" souvenir-sheet="105"/>
<Formats label="1" state="depressed" se-tenant="105"/>
<Formats label="2" state="active" se-tenant="107"/>
</FormatButtons>
<StampButtons>
<Stamp label="1" state="active" pofis-number="105"/>
<Stamp label="2" state="active" pofis-number="106"/>
</StampButtons>
</FormatPage>
<FormatPage se-tenant="107">
<FormatButtons>
<Formats state="active" souvenir-sheet="105"/>
<Formats label="1" state="active" se-tenant="105"/>
<Formats label="2" state="depressed" se-tenant="107"/>
</FormatButtons>
<StampButtons>
<Stamp label="1" state="active" pofis-number="107"/>
<Stamp label="2" state="active" pofis-number="108"/>
</StampButtons>
</FormatPage>
</DesiredOutput>-------------------
<MyOutput>
<StampPage>
<FormatButtons>
<Formats state="active" souvenir-sheet="105"/>
<Formats state="active" se-tenant="105"/>
</FormatButtons>
<StampButtons>
<Stamp state="depressed" pofis-number="105"/>
</StampButtons>
</StampPage>
<StampPage>
<FormatButtons>
<Formats state="active" souvenir-sheet="105"/>
<Formats state="active" se-tenant="105"/>
</FormatButtons>
<StampButtons>
<Stamp state="depressed" pofis-number="106"/>
</StampButtons>
</StampPage>
<StampPage>
<FormatButtons>
<Formats state="active" souvenir-sheet="105"/>
<Formats state="active" se-tenant="107"/>
</FormatButtons>
<StampButtons>
<Stamp state="depressed" pofis-number="107"/>
</StampButtons>
</StampPage>
<StampPage>
<FormatButtons>
<Formats state="active" souvenir-sheet="105"/>
<Formats state="active" se-tenant="107"/>
</FormatButtons>
<StampButtons>
<Stamp state="depressed" pofis-number="108"/>
</StampButtons>
</StampPage>
<FormatPage souvenir-sheet="105">
<FormatButtons>
<!-- My problem -->
</FormatButtons>
<StampButtons>
<Stamp label="1" state="active" pofis-number="105"/>
<Stamp label="2" state="active" pofis-number="106"/>
<Stamp label="3" state="active" pofis-number="107"/>
<Stamp label="4" state="active" pofis-number="108"/>
</StampButtons>
</FormatPage>
<FormatPage se-tenant="105">
<FormatButtons>
<!-- My problem -->
</FormatButtons>
<StampButtons>
<Stamp label="1" state="active" pofis-number="105"/>
<Stamp label="2" state="active" pofis-number="106"/>
</StampButtons>
</FormatPage>
<FormatPage se-tenant="107">
<FormatButtons>
<!-- My problem -->
</FormatButtons>
<StampButtons>
<Stamp label="1" state="active" pofis-number="107"/>
<Stamp label="2" state="active" pofis-number="108"/>
</StampButtons>
</FormatPage>
</MyOutput> <xsl:template match="Set">
<xsl:element name="Output">
<xsl:apply-templates mode="stamp"/>
<xsl:apply-templates mode="formats"/>
</xsl:element>
</xsl:template><xsl:template match="Stamp" mode="formats"> <xsl:apply-templates mode="formats"/> </xsl:template>
<xsl:template match="Formats" mode="stamp">
<xsl:element name="Formats">
<xsl:attribute name="state" select="'active'"/>
<xsl:copy-of select="@*"/>
</xsl:element>
</xsl:template>| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Define internal xsl varia, Mukul Gandhi | Thread | Re: [xsl] Unable to select wanted n, Brandon Ibach |
| Re: [xsl] how to trigger a new page, Tony Graham | Date | Re: [xsl] Unable to select wanted n, Brandon Ibach |
| Month |