[ 
https://issues.apache.org/jira/browse/XALANJ-2839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mukul Gandhi resolved XALANJ-2839.
----------------------------------
    Resolution: Fixed

I'm resolving this jira issue as fixed, since implementation of this jira issue 
has been committed to Xalan Java XSLT 3.0 development branch.

> improvements to xslt3.0 positional grouping implementation
> ----------------------------------------------------------
>
>                 Key: XALANJ-2839
>                 URL: https://issues.apache.org/jira/browse/XALANJ-2839
>             Project: XalanJ2
>          Issue Type: Bug
>      Security Level: No security risk; visible to anyone(Ordinary problems in 
> Xalan projects.  Anybody can view the issue.) 
>          Components: Xalan-interpretive
>    Affects Versions: xslt3.0_alpha1
>            Reporter: Mukul Gandhi
>            Assignee: Mukul Gandhi
>            Priority: Major
>
> Martin Honnen has reported following bug, where Xalan Java XSLT 3.0 
> development code doesn't produce the desired expected result.
> XSLT 3.0 stylesheet:
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>                          version="3.0"
>                          xmlns:xs="http://www.w3.org/2001/XMLSchema";
>                          exclude-result-prefixes="#all">
>    <xsl:output method="xml" indent="yes"/>
>    <xsl:param name="chunk-size" as="xs:integer" select="3"/>
>    <xsl:template match="/">
>      <xsl:for-each-group select="items/item" group-adjacent="(position()
> - 1) idiv $chunk-size">
>        <chunk number="{position()}">
>          <xsl:sequence select="current-group()"/>
>        </chunk>
>      </xsl:for-each-group>
>    </xsl:template>
> </xsl:stylesheet>
> XML input document:
> <?xml version="1.0" encoding="UTF-8"?>
> <items>
>    <item>Item 1</item>
>    <item>Item 2</item>
>    <item>Item 3</item>
>    <item>Item 4</item>
>    <item>Item 5</item>
>    <item>Item 6</item>
>    <item>Item 7</item>
>    <item>Item 8</item>
>    <item>Item 9</item>
>    <item>Item 10</item>
>    <item>Item 11</item>
>    <item>Item 12</item>
>    <item>Item 13</item>
> </items>
> With the following expected result:
> <?xml version="1.0" encoding="UTF-8"?>
> <chunk number="1">
>     <item>Item 1</item>
>     <item>Item 2</item>
>     <item>Item 3</item>
> </chunk>
> <chunk number="2">
>     <item>Item 4</item>
>     <item>Item 5</item>
>     <item>Item 6</item>
> </chunk>
> <chunk number="3">
>     <item>Item 7</item>
>     <item>Item 8</item>
>     <item>Item 9</item>
> </chunk>
> <chunk number="4">
>     <item>Item 10</item>
>     <item>Item 11</item>
>     <item>Item 12</item>
> </chunk>
> <chunk number="5">
>     <item>Item 13</item>
> </chunk>



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to