|
Subject: RE: [xsl] Ignoring Child Nodes using XPath From: "Michael Kay" <mhkay@xxxxxxxxxxxx> Date: Mon, 26 Mar 2001 18:08:22 +0100 |
> 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").
yes you should!
But I'm now completely mystfied, the usual form of XPath used in
selectSingleNode() is a downwards selection from the root, e.g.
"/html/body/p" - so where do the children come into it?
What are you actually doing that doesn't work?
Mike Kay
>
> 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: [xsl] 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
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Ignoring Child Nodes usin, Ciaran Byrne | Thread | [xsl] XSL:if condition shows runtim, Preethi Suthakar |
| [xsl] XSL:if condition shows runtim, Preethi Suthakar | Date | [xsl] value-of formattting, Lors, Ben |
| Month |