Subject: RE: [xsl] Adding Missing Element From: "Bjorndahl, Brad" <brad.bjorndahl@xxxxxxxxxxxxxxxx> Date: Wed, 23 Jan 2008 17:58:43 -0500 |
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: [xsl] 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Adding Missing Element, David Carlisle | Thread | [xsl] Help! How do I find elements , Marroc |
Re: [xsl] Adding Missing Element, David Carlisle | Date | Re: [xsl] enclosing siblings in an , David Carlisle |
Month |