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

Re: Still thinking to object oriented...

Subject: Re: Still thinking to object oriented...
From: "Jonas Bassl" <Jonas@xxxxxxxx>
Date: Thu, 9 Oct 2008 11:56:19 +0200
Re:  Still thinking to object oriented...
Okay, i am sorry.
First i have now this error:

Required item type of first argument of name() is node(); supplied
value has item type xs:string
URL: http://www.w3.org/TR/xpath20/#ERRXPTY0004

i am sorry, i will ask my question again with a higher accuracy:

select="//*[descendant-or-self::*[contains(name(),'to_search')]]/name()"

this expression gets me the names of all ancestors from the nodes,
which contain the string "to_search". This was quite okay for me
untill now. But i got new requirements to output also the attributes
to these nodes. Now i need help to transform the expression to output
the real nodes as a nodelist for example like for example the node()
function does.



2008/10/9 Michael Kay <mike@xxxxxxxxxxxx>:
>
>> Thank you,
>> but i am getting this error:
>>
>> Cannot mix nodes and atomic values in the result of a path expression
>> URL: http://www.w3.org/TR/xpath20/#ERRXPTY0018
>>
>
> Yes, that's a silly restriction in the language. Change it to
>
> select="//*[descendant-or-self::*[contains(name(),'to_search')]]/(name(),
> @*/string())"
>
> (But I suspect Andrew answered your question too literally. I suspect you
> don't just want the attribute values, you probably want their names as well.
> But he answered the question that you asked, it's not his fault if you
> didn't make your requirements clear...)
>
> Michael Kay
> http://www.saxonica.com/

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.