Uploaded image for project: 'XalanJ2'
  1. XalanJ2
  2. XALANJ-2425

Xalan's set:distinct() is broken by design

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.7.1
    • None
    • XSLTC
    • None
    • Any
    • fp3

    Description

      Xalan's EXSLT set:distinct() is implemented in a way it is not useful, not usable and also confusing, not mentioning it will throw an exception if feed attributes list.

      See attached files, result is
      <html xmlns:set="http://exslt.org/sets">
      <body>root</body>
      </html>
      for both libXSLT and xalan-interpreted, but it is
      <html xmlns:set="http://exslt.org/sets">
      <body></body>
      </html>
      for XSLTC.

      Reason: Xalan does iterator for set:distinct() by creating a document, stuffing node list into document's element, and iterating over its children.
      This have two consequences: you can't access parent node from such node-list, and also see XALANJ-2424.
      See class BasisLibrary.

      Attachments

        1. xml1.xml
          0.2 kB
          Ilya Kasnacheev
        2. xsl2.xsl
          0.4 kB
          Ilya Kasnacheev

        Activity

          People

            Unassigned Unassigned
            ilyak Ilya Kasnacheev
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: