This kind of thing is very simple with template rules:
<xsl:template match="ORDER|ORDER2">
<ORDER><xsl:apply-templates/></ORDER>
</xsl:template>
<xsl:template match="QUOTE1|QUOTE2">
<QUOTE><xsl:apply-templates/></QUOTE>
</xsl:template>
<xsl:template match="QUANTITY1|QUANTITY2">
<QUANTITY><xsl:apply-templates/></QUANTITY>
</xsl:template>
Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx
PS: you are hereby notified that the legal notice attached to your email
is completely absurd and will therefore be ignored.
> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
> Divakar Satyanarayan
> Sent: 30 December 2002 13:53
> To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> Subject: Partial Matching For
>
>
> Hi,
>
> I have an XML file which has tags corresponding to the
> number of orders
>
> <ORDER1>
> <QUOTE1>
> 120
> </QUOTE1>
> <QUANTITY1>
> 87
> </QUANTITY1>
> </ORDER1>
> <ORDER2>
> <QUOTE2>
> 789
> </QUOTE2>
> <QUANTITY2>
> 980
> </QUANTITY2>
> </ORDER2>
>
> I want to generate an XML file that would correspond to following XML
>
> <ORDER>
> <QUOTE>
> 120
> </QUOTE>
> <QUANTITY>
> 87
> </QUANTITY>
> </ORDER>
> <ORDER>
> <QUOTE>
> 789
> </QUOTE>
> <QUANTITY>
> 980
> </QUANTITY>
> </ORDER>
>
> Can anybody help me ?
>
> Regards,
> Divakar
>
>
> DISCLAIMER: Information contained and transmitted by this
> E-MAIL is proprietary to Mascot Systems Limited and is
> intended for use only by the individual or entity to which it
> is addressed, and may contain information that is privileged,
> confidential or exempt from disclosure under applicable law.
> If this is a forwarded message, the content of this E-MAIL
> may not have been sent with the authority of the Company. If
> you are not the intended recipient, an agent of the intended
> recipient or a person responsible for delivering the
> information to the named recipient, you are notified that any
> use, distribution, transmission, printing, copying or
> dissemination of this information in any way or in any manner
> is strictly prohibited. If you have received this
> communication in error, please delete this mail & notify us
> immediately at Mailadmin@xxxxxxxxxxxxxxxxx Before opening
> attachments, please scan for viruses.
>
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|