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

RE: Ignoring Child Nodes using XPath

Subject: RE: Ignoring Child Nodes using XPath
From: "Ciaran Byrne" <ciaran.byrne@xxxxxxx>
Date: Mon, 26 Mar 2001 16:37:35 -0800
xslt child nodes listing
Sorry,
	I should have mentioned the fact that I'm not using the
XPath Query in an XSL stylesheet but rather to select the
node in MSXML i.e. dom.selectsinglenode("XPath Query").

I know I could concat the element together by getting the element
name and attributes but I thought there might have been a
more efficient solution using an XPath Query.

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Michael Kay
Sent: Monday, March 26, 2001 1:58 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Ignoring Child Nodes using XPath


> 	Is there a way in which I can
> select a node ignoring the child nodes
> as in the following example:
>
> What I have...
>
> <p align="left">
> Here <b>is</b> some content<br/>
> </p>
>
> What I want...
> <p alignt="left"></p>

There are many ways of ignoring the child nodes, in fact they will always be
ignored unless you specifically do something to access them.

Try
<xsl:template match="p">
  <xsl:copy/>
  <xsl:copy-of select="@*"/>
</xsl:template>

Mike Kay
Software AG


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.