Click here to Skip to main content
15,891,993 members
Home / Discussions / XML / XSL
   

XML / XSL

 
AnswerRe: How to de-batch very large XMLDocument into bit size chunks Pin
daveyerwin28-Feb-10 8:44
daveyerwin28-Feb-10 8:44 
GeneralRe: How to de-batch very large XMLDocument into bit size chunks Pin
ONeil Tomlinson1-Mar-10 6:33
ONeil Tomlinson1-Mar-10 6:33 
QuestionUnclosed tr tag Pin
John Jones II26-Feb-10 4:35
John Jones II26-Feb-10 4:35 
AnswerRe: Unclosed tr tag Pin
Richard MacCutchan26-Feb-10 5:23
mveRichard MacCutchan26-Feb-10 5:23 
AnswerRe: Unclosed tr tag Pin
Stuart Dootson26-Feb-10 7:45
professionalStuart Dootson26-Feb-10 7:45 
QuestionXML schema - Element name used to identify item problem... - need to use the element name to identify value when importing into SQL 2005 tables Pin
VicarH25-Feb-10 7:37
VicarH25-Feb-10 7:37 
QuestionDisplay a image in picturebox Pin
kpuneeth723-Feb-10 20:36
kpuneeth723-Feb-10 20:36 
AnswerRe: Display a image in picturebox Pin
Stuart Dootson23-Feb-10 20:50
professionalStuart Dootson23-Feb-10 20:50 
GeneralRe: Display a image in picturebox [modified] Pin
kpuneeth723-Feb-10 21:01
kpuneeth723-Feb-10 21:01 
GeneralRe: Display a image in picturebox Pin
Stuart Dootson23-Feb-10 21:36
professionalStuart Dootson23-Feb-10 21:36 
GeneralRe: Display a image in picturebox Pin
kpuneeth723-Feb-10 23:53
kpuneeth723-Feb-10 23:53 
GeneralRe: Display a image in picturebox Pin
Stuart Dootson24-Feb-10 0:08
professionalStuart Dootson24-Feb-10 0:08 
GeneralRe: Display a image in picturebox Pin
kpuneeth724-Feb-10 1:26
kpuneeth724-Feb-10 1:26 
QuestionMultiple group using Muenchian Method [modified] Pin
ONeil Tomlinson23-Feb-10 4:15
ONeil Tomlinson23-Feb-10 4:15 
AnswerRe: Multiple group using Muenchian Method Pin
Stuart Dootson23-Feb-10 20:47
professionalStuart Dootson23-Feb-10 20:47 
Firstly, your key needs to have an expression which reflects what you want to retrieve:

<xsl:key name="CCids" match="/List/Section" use="concat(Code,'|',ID)"/>


And then you need to use that same expression when accessing items referenced by the key.

Oh - and in addition, I would suggest not using a for loop - it's not idiomatic XSL. Here's the file I'd use:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var" version="1.0" xmlns:ns0="http://A4C.Interface.HRP.Payroll.Schemas">
   <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" encoding="utf-8"/>

   <xsl:key name="CCids" match="/List/Section" use="concat(Code,'|',ID)"/>

   <xsl:template match="/">
      <ns0:List>
         <xsl:apply-templates select="/List/Section [generate-id(.)=generate-id(key('CCids',concat(Code,'|',ID)))]"/>
      </ns0:List>
   </xsl:template>
            
   <xsl:template match="Section">
      <Section>
         <Code>
            <xsl:value-of select="Code/text()" />
         </Code>
         <ID>
            <xsl:value-of select="ID/text()" />
         </ID>
      </Section>
   </xsl:template>
</xsl:stylesheet>
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

CodeProject MVP for 2010 - who'd'a thunk it!

GeneralRe: Multiple group using Muenchian Method Pin
ONeil Tomlinson24-Feb-10 0:05
ONeil Tomlinson24-Feb-10 0:05 
QuestionHow Do I deserialize the following Xml string? [modified] Pin
ashishtango22-Feb-10 23:05
ashishtango22-Feb-10 23:05 
AnswerRe: How Do I deserialize the following Xml string? Pin
Stuart Dootson22-Feb-10 23:54
professionalStuart Dootson22-Feb-10 23:54 
GeneralRe: How Do I deserialize the following Xml string? Pin
ashishtango23-Feb-10 16:52
ashishtango23-Feb-10 16:52 
GeneralRe: How Do I deserialize the following Xml string? Pin
Stuart Dootson23-Feb-10 20:27
professionalStuart Dootson23-Feb-10 20:27 
GeneralRe: How Do I deserialize the following Xml string? Pin
ashishtango24-Feb-10 18:35
ashishtango24-Feb-10 18:35 
QuestionAccessing a image from a xml file and display in visual studio picture box Pin
kpuneeth722-Feb-10 21:15
kpuneeth722-Feb-10 21:15 
AnswerRe: Accessing a image from a xml file and display in visual studio picture box Pin
Richard MacCutchan22-Feb-10 22:31
mveRichard MacCutchan22-Feb-10 22:31 
Questionxsd to entity [modified] Pin
pokiri22-Feb-10 17:45
pokiri22-Feb-10 17:45 
AnswerRe: xsd to entity Pin
Not Active22-Feb-10 21:01
mentorNot Active22-Feb-10 21:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.