xsl-list
[Top] [All Lists]

Re: [xsl] XTTE1100: A sequence of more than one item is not allowed as the @group-adjacent attribute

2013-05-12 23:08:34
It has since occurred that the client will probably live with
discrepancy of the initial version. Nonetheless I am trying to look up
serialize. It's not an XPath 2 function is it?

On Mon, May 13, 2013 at 4:56 AM, Dimitre Novatchev 
<dnovatchev(_at_)gmail(_dot_)com> wrote:
Yes, this should work:

    group-adjacent="*/serialize(.)"

On Sun, May 12, 2013 at 8:48 PM, Dimitre Novatchev 
<dnovatchev(_at_)gmail(_dot_)com> wrote:
It seems to me that something like this might be useful:

group-adjacent="my:deepEqualAdjacent(*)"


of course this only conveys the idea -- it is obvious that this isn't 
precise.


On Sun, May 12, 2013 at 8:08 PM, G. Ken Holman
<gkholman(_at_)cranesoftwrights(_dot_)com> wrote:
At 2013-05-12 20:00 -0700, Dimitre Novatchev wrote:

     select="*" group-adjacent="string-join(descendent::*/local-name(),'
')"

this treats the following two fragments as belonging to the same
group, and I believe Ihe doesn't want this:

 <B>
     <C/>
     <D/>
  </B>

and

 <B>
     <C>
       <D>
    </C>
  </B>


Well spotted, Dmitre.

How about something like the following to make the distinction, using a
simple non-name character to attach the depth to the name?

  group-adjacent="string-join(descendent::*/
                             concat(local-name(),'$',count(ancestor::*)))"

(untested)


. . . . . . . . Ken


--~------------------------------------------------------------------
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>