[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: generating xml from xml
Murali,
Keys were invented for just this kind of application. Declare a key that lets you retrieve your field mapping elements by their id values: <xsl:key name="field-by-id" match="_" use="@id"/> Then, for example, <xsl:template match="Trade/*"> <xsl:element name="key('field-by-id',local-name())/fn"> <xsl:apply-templates/> </xsl:element> </xsl:template> would match a child of Trade and create an element with the appropriate name (if I have it right). Really, I'm helping you less by writing the code than I would by explaining it better -- but you can (and should) find a good explanation of keys in a published resource. Whether MSXML3.0 supports keys, I can't say for sure (though I think it does). If not, this can still be done with brute force (albeit expensively) using an XPath location path. Cheers, Wendell At 10:31 AM 11/10/2003, you wrote: Hi, ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ====================================================================== XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|