Uploaded image for project: 'Jackrabbit FileVault'
  1. Jackrabbit FileVault
  2. JCRVLT-391

Remove copied classes of Xerces

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.4.0
    • Fix Version/s: 3.4.2
    • Component/s: vlt
    • Labels:
      None

      Description

      Currently the classes below o.a.j.v.util.xml seem to be a copy of Xerces classes. Instead of just relying on an old copy one should use a proper Maven dependency together with https://maven.apache.org/plugins/maven-shade-plugin/ or https://bnd.bndtools.org/instructions/conditionalpackage.html to make sure update to the latest version is possible.
      Also it needs to be clarified if the embedded Xerces should be listed explicitly in https://github.com/apache/jackrabbit-filevault/blob/trunk/LICENSE.txt.

      The original intent is stated in https://github.com/apache/jackrabbit-filevault/blob/9fa6c72bf4bdf36331b50b9370f3ed826a4622e8/vault-core/src/main/java/org/apache/jackrabbit/vault/util/xml/serialize/XMLSerializer.java#L64.
      The only modifications to the original Xerces were linebreaks after attributes and an alphabetic attribute sort order.

      The following alternatives are available:

      1. Use the javax.xml.transform API (JAXP Transformation API, TrAX). There is no official way though to control the order of attribute, therefore I would recommend to already emit the attributes in the correct order instead of reordering them with the output. Controlling the indentation of attributes is hard to achieve: https://stackoverflow.com/questions/8393370/use-xslt-to-add-newlines-after-attributes
      2. Use StAX with the Woodstox implementation. Seems faster, but still no sophisticated output formatting options available (like indentation options and line length)
      3. Implement a simple serializer based on SAX events from scratch

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kwin Konrad Windszus
                Reporter:
                kwin Konrad Windszus
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: