I tried to trasform an xml file to another xml file with an xslt stylesheet, but when I do a very simple transformation like
<xsl:template match="/">
<xsl:apply-templates select="//Package" />
</xsl:template>
<xsl:template match="//Package">
<behaviour>
<xsl:attribute name="id"><xsl:value-of select="@Id"/></xsl:attribute>
<xsl:attribute name="name"><xsl:value-of select="@Name" /></xsl:attribute>
<attributes>
<author><xsl:value-of select="./PackageHeader/Vendor"/></author>
<date><xsl:value-of select="./PackageHeader/Created"/></date>
<description><xsl:value-of select="./PackageHeader/Description"/></description>
<goal></goal>
<revision><xsl:value-of select="./RedefinableHeader/Version"/></revision>
</attributes>
if the tag Package of the source xml file has an attribute, the transformation didn't happening, like if not read the tag Package, meanwhile if the tag hasn't any attribute, the transformation running correctly..
any idea? I do some error that I can't see? For the transformation i use the xsl processor internal at editor EditiX 2008
the part "inherent" to this thread of my xml source file is
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="xpdl2sybel.xsl"?>
<Package xmlns:xpdl="http://www.wfmc.org/2008/XPDL2.1" xmlns="http://www.wfmc.org/2008/XPDL2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Id="message_flow_2" Name="Message Flow 2" xsi:schemaLocation="http://www.wfmc.org/2008/XPDL2.1 http://www.yaoqiang.org/schemas/bpmnxpdl_31.xsd">
<PackageHeader>
<XPDLVersion>2.1</XPDLVersion>
<Vendor>Yaoqiang</Vendor>
<Created>2010-05-14 22:26:55</Created>
<Description>Message Flow connecting to Flow Objects within two Pools</Description>
</PackageHeader>
<RedefinableHeader>
<Version>0.03</Version>
</RedefinableHeader>
</Package>
Thanks in advance!