tags:

views:

20

answers:

1

I am looking for a match on template to process the XML,

my XML file looks like

<root xmlns="urn:nampespace1" xmlns:xsi="urn:namespace2">
  <time xsi:type="IVL">
     <low value="19990101"/>
     <high value="20000223"/>
  </time>

  <obs>
     <time xsi:type="PIVL">
    <period value="9" unit="h"/>
     </time>
  </obs>
</root>

        I would like to have a template to process the <time> element based on xsi:type. Can i have match expression for the template

<!-- if xsi:type PIVL-->
<xsl:template match="?">
</xsl:template>

<!-- if xsi:type IVL-->
<xsl:template match="?">
</xsl:template>
+2  A: 
<xsl:tempate match="//time[@xsi:type='PIVL']"
</xsl:template>

<xsl:tempate match="//time[@xsi:type='IVL']"
</xsl:template>
system PAUSE