Click here to Skip to main content
14,575,820 members
   

XML / XSL

 
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
Memberkpuneeth723-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
Memberkpuneeth723-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
Memberkpuneeth724-Feb-10 1:26 
QuestionMultiple group using Muenchian Method [modified] Pin
ONeil Tomlinson23-Feb-10 4:15
MemberONeil 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
MemberONeil Tomlinson24-Feb-10 0:05 
QuestionHow Do I deserialize the following Xml string? [modified] Pin
ashishtango22-Feb-10 23:05
Memberashishtango22-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
Memberashishtango23-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
Memberashishtango24-Feb-10 18:35 
QuestionAccessing a image from a xml file and display in visual studio picture box Pin
kpuneeth722-Feb-10 21:15
Memberkpuneeth722-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
Memberpokiri22-Feb-10 17:45 
AnswerRe: xsd to entity Pin
Not Active22-Feb-10 21:01
mentorNot Active22-Feb-10 21:01 
QuestionHow to delete duplicate nodes from XML throgh C#? Pin
deadlyabbas18-Feb-10 19:12
Memberdeadlyabbas18-Feb-10 19:12 
QuestionProblem with MSXML6 + namespace + XPath Pin
Patrice Espie18-Feb-10 4:57
MemberPatrice Espie18-Feb-10 4:57 
AnswerRe: Problem with MSXML6 + namespace + XPath Pin
Stuart Dootson23-Feb-10 0:10
professionalStuart Dootson23-Feb-10 0:10 
QuestionProblem with loading a xml to DataSet Pin
alireza_shokoie15-Feb-10 23:42
Memberalireza_shokoie15-Feb-10 23:42 
AnswerRe: Problem with loading a xml to DataSet Pin
daveyerwin18-Feb-10 2:51
Memberdaveyerwin18-Feb-10 2:51 
QuestionXSL help Pin
Member 39976067-Feb-10 0:13
MemberMember 39976067-Feb-10 0:13 
AnswerRe: XSL help Pin
Stuart Dootson7-Feb-10 1:09
professionalStuart Dootson7-Feb-10 1:09 

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.