Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Newbie help with transform - force output element not in input

From: Martin Honnen <mahotrash@-----.-->
To: 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/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent