Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Newbie help with transform - force output element not in input >Thread Next - Re: Newbie help with transform - force output element not in input Re: Newbie help with transform - force output element not in inputTo: NULL Date: 5/2/2007 6:27:00 PM Flomo Togba Kwele wrote: > <xsl:template match="/csv_data_records"> > <StdAddress> > <xsl:for-each select="@source"> > <xsl:attribute name="source"> > <xsl:value-of select="."/> > </xsl:attribute> > </xsl:for-each> > <xsl:for-each select="record"> > <record> > <xsl:for-each select="@num"> > <xsl:attribute name="num"> > <xsl:value-of select="."/> > </xsl:attribute> > </xsl:for-each> > <xsl:for-each select="PRIMARY_SIC"> > <UseCode> > <xsl:value-of select="."/> > </UseCode> > </xsl:for-each> > <OwnerAbsentOccupied>O</OwnerAbsentOccupied> > </record> > </xsl:for-each> > </StdAddress> > </xsl:template> > > And the output: > > <csv_data_records source="C:\List-1259507711.TXT"> > <record num="1"> > <PRIMARY_SIC>769962</PRIMARY_SIC> > </record> A literal result element such as the OwnerAbsentOccupied element you have above will be output literally so there should not be a problem. However the root created above is StdAddress and not csv_data_records so the alleged output does not fit the XSLT you present. -- Martin Honnen http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
