RE: [xsl] Still thinking to object oriented...

Subject: RE: [xsl] Still thinking to object oriented...
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 9 Oct 2008 10:36:15 +0100
> 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