Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-500

In org.apache.xmlbeans.impl.store.Saver.java constructor prefix and uri added to map in reverse

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • Version 2.6
    • None
    • None
    • Happens when XmlOptions.SAVE_IMPLICIT_NAMESPACES is set.

    Description

      On lines 98 and 99 of Saver.java the prefix and uri fields are reversed when calling the addMapping method. This causes namespaces to not be set as requested because _uriMap and _prefixMap lookups don't work correctly.
      Original code is:
      String prefix = (String) i.next();
      addMapping( prefix, (String) m.get( prefix ) );

      Suggested code is:
      String uri = (String) i.next();
      addMapping( (String) m.get( uri ), uri);

      Attachments

        Activity

          People

            Unassigned Unassigned
            simcfarl Scott McFarlane
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: