Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - using vba transformXML to alter schema definition [Thread Next] RE: using vba transformXML to alter schema definitionTo: NULL Date: 2/6/2007 1:25:00 AM Thanks Joe, this is what I ended up with. Its not pretty because it really doesn't examine the primary key part of the schema definition properly. But it does a ok job. <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:od="urn:schemas-microsoft-com:officedata"> <xsl:output method="xml" indent="yes" /> <xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates select="@*|node()" /> </xsl:copy> </xsl:template> <xsl:template match="*[@minOccurs=1 and @od:jetType='decimal' and position()=1] "> <xsl:comment> Changing decimal to autonumber </xsl:comment> <xsl:copy> <xsl:apply-templates select="@name|@od:sqlSType|@od:nonNullable" /> <xsl:attribute name="minOccurs">1</xsl:attribute> <xsl:attribute name="od:jetType">autonumber</xsl:attribute> <xsl:attribute name="od:autoUnique">yes</xsl:attribute> <xsl:apply-templates select="node()" /> </xsl:copy> </xsl:template> </xsl:stylesheet> | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
