I'm finding a problem with the xmi tags ( example : UML:Package) my real problem is that I can't use for-each loop with the select option (select="UML:Package") . Here's the XML input code :
<XMI xmi.version='1.2' xmlns:UML="org.omg.xmi.namespace.UML">
<UML:Package type="stock" exch="nyse" symbol="ZCXM" company="zacx corp"
price="28.875"/>
<UML:Package type="stock" exch="nasdaq" symbol="ZFFX" company="zaffymat inc"
price="92.250"/>
<UML:Package type="stock" exch="nasdaq" symbol="ZYSZ" company="zysmergy inc"
price="20.313"/>
</XMI>
and here's my xslt code :
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:UML="org.omg.xmi.namespace.UML" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes" />
<xsl:template match="/">
<xmi:XMI>
<xsl:for-each select="UML:Package">
<stock>
<xsl:attribute name="exchange">
<xsl:value-of select="@exch" />
</xsl:attribute>
<name>
<xsl:value-of select="@company" />
</name>
<symbol>
<xsl:value-of select="@symbol" />
</symbol>
<price>
<xsl:value-of select="@price" />
</price>
</stock>
<hi>
</hi>
</xsl:for-each>
</xmi:XMI>
</xsl:template>
</xsl:stylesheet>
and this is what I get as a result :
<?xml version="1.0" encoding="UTF-8"?><XMI xmlns:UML="org.omg.xmi.namespace.UML"/>
with no erros on the console :
10:10:19,639 INFO [main] Main - javax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
10:10:19,639 INFO [main] Main - java.endorsed.dirs=D:\PFE.metadata.plugins\org.eclipse.wst.xsl.jaxp.launching\endorsed 10:10:19,639 INFO [main] Main - launchFile: D:\PFE.metadata.plugins\org.eclipse.wst.xsl.jaxp.launching\launch\launch.xml 10:10:19,873 INFO [main] JAXPSAXProcessorInvoker - Transforming... 10:10:19,889 INFO [main] JAXPSAXProcessorInvoker - Done.
any help?