xslt broken: pattern does not match
- by krisvandenbergh
I'm trying to query an xml file using the following xslt:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:bpmn="http://dkm.fbk.eu/index.php/BPMN_Ontology">
<!-- Participants -->
<xsl:template match="/">
<html>
<body>
<table>
<xsl:for-each select="Package/Participants/Participant">
<tr>
<td><xsl:value-of select="ParticipantType" /></td>
<td><xsl:value-of select="Description" /></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Here's the contents of the xml file:
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="xpdl2bpmn.xsl"?>
<Package xmlns="http://www.wfmc.org/2008/XPDL2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Id="25ffcb89-a9bf-40bc-8f50-e5afe58abda0" Name="1 price setting" OnlyOneProcess="false">
<PackageHeader>
<XPDLVersion>2.1</XPDLVersion>
<Vendor>BizAgi Process Modeler.</Vendor>
<Created>2010-04-24T10:49:45.3442528+02:00</Created>
<Description>1 price setting</Description>
<Documentation />
</PackageHeader>
<RedefinableHeader>
<Author />
<Version />
<Countrykey>CO</Countrykey>
</RedefinableHeader>
<ExternalPackages />
<Participants>
<Participant Id="008af9a6-fdc0-45e6-af3f-984c3e220e03" Name="customer">
<ParticipantType Type="RESOURCE" />
<Description />
</Participant>
<Participant Id="1d2fd8b4-eb88-479b-9c1d-7fe6c45b910e" Name="clerk">
<ParticipantType Type="ROLE" />
<Description />
</Participant>
</Participants>
</Package>
Despite, the simple pattern, the foreach doesn't work. What is wrong with Package/Participants/Participant ? What do I miss here?
Thanks a lot!