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

Re: XTTE1100: A sequence of more than one item is not

Subject: Re: XTTE1100: A sequence of more than one item is not allowed as the @group-adjacent attribute
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Sun, 12 May 2013 20:00:03 -0700
Re:  XTTE1100: A sequence of more than one item is not
     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>


On Sun, May 12, 2013 at 6:59 PM, G. Ken Holman
<gkholman@xxxxxxxxxxxxxxxxxxxx> 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.
>
>
> . . . . . . . . . Ken
>
> --
> Contact us for world-wide XML consulting and instructor-led training |
> Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm |
> Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/s/ |
> G. Ken Holman                   mailto:gkholman@xxxxxxxxxxxxxxxxxxxx |
> Google+ profile: https://plus.google.com/116832879756988317389/about |
> Legal business disclaimers:    http://www.CraneSoftwrights.com/legal |
>



-- 
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all
------------------------------------
Quality means doing it right when no one is looking.
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
Facts do not cease to exist because they are ignored.
-------------------------------------
Typing monkeys will write all Shakespeare's works in 200yrs.Will they
write all patents, too? :)
-------------------------------------
I finally figured out the only reason to be alive is to enjoy it.

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.