RE: Adding Missing Element
Hi, Something like this, I think: <xsl:template match="A[not B]" > . . . copy in your B element template . . . . . . other stuff . . . </xsl:template> <xsl:template match="A[B]" > . . . copy this B element . . . . . . other stuff . . . </xsl:template> Brad -----Original Message----- From: Plana, Richard [mailto:Richard.Plana@xxxxxxxxxxxxxxxx] Sent: January 23, 2008 5:45 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Adding Missing Element Hi, I have what seems like a simple problem but am having problems writing the XSLT. I just need to make sure that all instances of an element (<A>) contains a certain other element (<B>). If it doesn't, then it should add an XML fragment <B> from a template into <A>. -- Richard Plana
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