|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Wrap changing element sequence into container: wit
> What I am having trouble to do is adding a container around a specific > (fixed-order) sequence of those `p4 elements, say, > `p[style="a"]4 and `p[style="b"]4, where the first of these > may not always occur. I suspect you're giving an example rather than an exact specification, so any solution you are given might not work. If you can identify a comparison between two adjacent siblings which, if true, means that they go in different containers, then you can use group-starting-with. For example, in this case the condition might be that the element is not immediately preceded by an element with a value for @style that is alphabetically less than the current element's @style: group-starting-with="p[not(preceding-sibling::p[1][@style lt current()/@style])]" If that's not the case, then you'll have to tell us what the precise specification of the problem is. There are of course some cases where you will have to resort to sibling recursion. Michael Kay http://www.saxonica.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






