xsl-list
[Top] [All Lists]

[xsl] xpath for array of node names

2007-07-18 15:16:52
Is it possible to construct an xpath which evaluates to an array of node
names?

e.g. given the following XML:

    <?xml version="1.0" encoding="utf-8"?>
    <propfind xmlns="DAV:"><prop>
    <getcontentlength xmlns="DAV:"/>
    <getlastmodified xmlns="DAV:"/>
    <executable xmlns="http://apache.org/dav/props/"/>
    <resourcetype xmlns="DAV:"/>
    <checked-in xmlns="DAV:"/>
    <checked-out xmlns="DAV:"/>
    </prop></propfind>
    
I want an xpath which evaluates to:
    
    array('getcontentlength', 'getlastmodified', 'executable',
        'checked-in', 'checked-out');

Something like: name(/propfind/prop/*) (Which only returns the name of
the first node)

Because I'm using the PHP5 DOM extension, I assume I'm limited to xpath
1.0.

Thanks! Jack

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>