Jump to content

Search the Community

Showing results for tags 'siblings'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. Here is my xml: <?xml version='1.0' encoding='UTF-8'?><wd:Report_Data xmlns:wd="urn:com.workday.report/CR-INT034-ADP-Garnishment_Disbursements_File-Outbound2"> <wd:Report_Entry> <wd:field>1111</wd:field> </wd:Report_Entry> <wd:Report_Entry> <wd:field>2222</wd:field> </wd:Report_Entry> <wd:Report_Entry> <wd:field>3333</wd:field> </wd:Report_Entry> <wd:Report_Entry> <wd:field>2222</wd:field> </wd:Report_Entry> <wd:Report_Entry> <wd:field>3333</wd:field> </wd:Report_Entry> <wd:Report_Entry> <wd:field>1111</wd:field> </wd:Report_Entry></wd:Report_Data> Here is the xslt I am using: <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:wd="urn:com.workday.report/CR-INT034-ADP-Garnishment_Disbursements_File-Outbound2" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"version="2.0"><xsl:strip-space elements="*"/><xsl:output indent="no" method="text" /> <xsl:key name="entry" match="wd:Report_Entry" use="wd:field" /> <xsl:template match="wd:Report_Data"> <xsl:value-of select="count(wd:Report_Entry | wd:field[ generate-id() = generate-id(key('entry', wd:field))])"/> </xsl:template> </xsl:stylesheet> I am trying to count the unique values. So in the example above, the answer should be 3 and I am getting 6. I can get this to work in 1.0 with the following code: <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:wd="urn:com.workday.report/CR-INT034-ADP-Garnishment_Disbursements_File-Outbound2" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"version="1.0"><xsl:strip-space elements="*"/><xsl:output indent="no" method="text" /> <xsl:key name="entry" match="wd:Report_Entry" use="wd:field" /> <xsl:template match="wd:Report_Data"> <xsl:value-of select="count(wd:Report_Entry [ generate-id() = generate-id(key('entry', wd:field))])"/> </xsl:template> </xsl:stylesheet> But I can't use 1.0 I have to use 2.0. Is there any way to get this to work in 2.0 or am I just out of luck? Any help would greatly be appreciated! Thanks,Sarah
×
×
  • Create New...