[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Adding Missing Element

Subject: RE: Adding Missing Element
From: "Bjorndahl, Brad" <brad.bjorndahl@xxxxxxxxxxxxxxxx>
Date: Wed, 23 Jan 2008 17:58:43 -0500
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.