[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Saxon8: XML to XML transformation
Hello everybody,
I've got a little problem and don't know how to solve it. I use Saxon8 inside a JavaBean and want to transform some data from an XML file to another XML file. If I use XMLSpy and apply the XSLT transformation to the XML file I get the desired output, but not with Saxon8. What am I supposed to do to get the same output like with XMLSpy? Why does Saxon behave like that?
<?xml version="1.0" encoding="UTF-8"?> <molecule> <object> <variable name="marco"/> </object> <superclass isaType=":"> <class> <constant name="employee"/> </class> </superclass> </molecule>
<?xml version="1.0" encoding="UTF-8"?> <ObjectClassificationAtom class=" employee "> <ObjectVariable name=" marco " class=" employee "/> </ObjectClassificationAtom>
<xsl:template match="/" > <xsl:apply-templates/> </xsl:template> <xsl:template match="molecule"> <xsl:if test="superclass/@isaType = ':'"> <xsl:element name="ObjectClassificationAtom"> <xsl:attribute name="class"> <xsl:apply-templates select="superclass/class/child::node()"/> </xsl:attribute> <xsl:apply-templates/> </xsl:element> </xsl:if> </xsl:template> <xsl:template match="object"> <xsl:element name="ObjectVariable"> <xsl:attribute name="name"><xsl:apply-templates/></xsl:attribute> <xsl:if test="../superclass"> <xsl:attribute name="class"> <xsl:apply-templates select="../superclass/class/child::node()"/> </xsl:attribute> </xsl:if> </xsl:element> </xsl:template> <xsl:template match="constant | variable | class"> <xsl:value-of select="@name"/> </xsl:template> <!-- ignore all the rest --> <xsl:template match="*"/> </xsl:stylesheet> -- http://www.informatik.tu-cottbus.de/~mpehla/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|