Uploaded image for project: 'Axiom'
  1. Axiom
  2. AXIOM-72

SAXOMBuilder needs to support default namespaces

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.2.8
    • None
    • None
    • All

    Description

      It is impossible to create elements with the SAXOMBuilder that use a default namespace. The startPrefixMapping method always calls OMElement.declareNamespace, even when the provided prefix is "" or null. OMElement in turn creates a prefix "axis2ns1".

      This is an issue when using a Castor mapping file in combination with spring-oxm.

      A possible fix to this issue would be to change the startPrefixMapping method to call OMElement.declareDefaultNamespace when the provided prefix is null or "", e.g.

      public void startPrefixMapping(String prefix, String uri)
      throws SAXException {
      if (nextElem == null)
      nextElem = createNextElement(null);
      if (null == prefix || "".equals(prefix))

      { nextElem.declareDefaultNamespace(uri); }

      else

      { nextElem.declareNamespace(uri, prefix); }

      }

      Attachments

        Issue Links

          Activity

            People

              veithen Andreas Veithen
              michaelheemskerk Michael Heemskerk
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0.5h
                  0.5h
                  Remaining:
                  Remaining Estimate - 0.5h
                  0.5h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified