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
| Current Thread |
|
Bjorndahl, Brad - 23 Jan 2008 23:00:51 -0000 <=
|
|