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 21:19:38
On Mon, May 13, 2013 at 2:59 AM, G. Ken Holman
<gkholman(_at_)cranesoftwrights(_dot_)com> wrote:
At 2013-05-13 02:49 +0100, Ihe Onwuka wrote:

I understand but what I described is what I want to do - no it is not
an academic exercise.

See an example of the required grouping - attribute and text nodes may
be present but are ignored for the purpose of grouping.

<A>
  <!-- start group>
  <B>
     <C>
     <D>
  </B>
  <B>
     <C>
     <D>
  </B>
  <! --end group>
  <B>  *** singleton group
  <C>  *** singleton group
  <!-- start group>
  <D>
    <E>
    <E>
      <F>
     <E>
   </D>
   <D>
    <E>
    <E>
      <F>
     <E>
   </D>
   <!-- end group>
     <!-- start group>
  <B>
     <C>
     <D>
  </B>
  <B>
     <C>
     <D>
  </B>
  <! --end group>
  </A>


Okay ... from what I can tell your original statement:


      I am trying to group the children of each
      element by the  local name of all of the
      descendant elements of each child.

... might be better expressed as:

      I am trying to group adjacent children
      where the sets of local names of descendent
      elements in document order of each child
      are identical.

... in which case the expression (untested) might be the following where
I've taken the set of local names and created a singleton string value for
grouping by joining them together:

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

I hope this helps.


YUP... knew it'd be something simple. thanks.

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