HI Friends,
I have posted xml and the required xml file, sorry for not posting xslt on which i am working, xslt is new fro me but still tried to do some stupid things.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/02/xpath-functions" xmlns:xdt="http://www.w3.org/2005/02/xpath-datatypes" xmlns:tm="urn:xmlintl-tm-tags" xmlns:text="http://openoffice.org/2000/text">
<xsl:output method="xml"/>
<xsl:template match="office-document">
<xsl:attribute name="xmlns:tm" namespace="urn:xmlintl-tm-tags">urn:xmlintl-tm-tags</xsl:attribute>
<xsl:element name="tm:tm">
<xsl:attribute name="te"></xsl:attribute><xsl:attribute name="ta"></xsl:attribute><xsl:attribute name="version"></xsl:attribute>
<xsl:attribute name="uid"></xsl:attribute><xsl:attribute name="source-language"></xsl:attribute><xsl:attribute name="date"></xsl:attribute>
<xsl:attribute name="xmltm-version"></xsl:attribute><xsl:attribute name="tool-name"></xsl:attribute><xsl:attribute name="tool-version"></xsl:attribute>
</xsl:element>
<xsl:element name="tm:vh">
<xsl:attribute name="version">1.0</xsl:attribute><xsl:attribute name="date">2003-05-02T14:15:03Z</xsl:attribute>
</xsl:element>
</xsl:template>
<xsl:template match="text:p">
<xsl:element name="tm:ta">
<xsl:attribute name="id"></xsl:attribute><xsl:attribute name="name"><xsl:text>name=</xsl:text><xsl:value-of select="@text:index-qualifier"/><xsl:text></xsl:text></xsl:attribute>
<xsl:attribute name="version">1.0</xsl:attribute>
</xsl:element>
<xsl:element name="tm:te">
<xsl:attribute name="id"></xsl:attribute><xsl:attribute name="ti"></xsl:attribute><xsl:attribute name="crc"></xsl:attribute>
<xsl:attribute name="version"></xsl:attribute><xsl:value-of select="."/>
<xsl:template match="text:index">
<xsl:element name="tm:ti"><xsl:attribute name="id"></xsl:attribute><xsl:attribute name="name"><xsl:text>text:name</xsl:text></xsl:attribute>
<xsl:attribute name="crc"></xsl:attribute><xsl:attribute name="version"></xsl:attribute>
<xsl:value-of select="."/>
</xsl:element>
</xsl:template>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
|