xs:appinfo markup lost in 1.4.3
-------------------------------

                 Key: WSCOMMONS-440
                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-440
             Project: WS-Commons
          Issue Type: Bug
          Components: XmlSchema
    Affects Versions: XmlSchema 1.4.3
            Reporter: Alexander Ilyin
            Priority: Blocker


the method handleAppInfo was changed in the 1.4.3 and now all my appinfo markup 
is lost during the reading the schema. This is because my xs.appinfo doesn't 
have the "source" attribute which I believe is optional and useless for my 
purposes.

New function:
=====================================================
XmlSchemaAppInfo handleAppInfo(Element content) {
                XmlSchemaAppInfo appInfo = new XmlSchemaAppInfo();
                NodeList markup = new DocumentFragmentNodeList(content);

                if (!content.hasAttribute("source")) {
                        return null;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

                }
                appInfo.setSource(getAttribute(content, "source"));
                appInfo.setMarkup(markup);
                return appInfo;
        } 

========================================================
Old function:
========================================================
        XmlSchemaAppInfo handleAppInfo(Element content) {
                XmlSchemaAppInfo appInfo = new XmlSchemaAppInfo();
                NodeList markup = getChildren(content);

                if (!content.hasAttribute("source")
                                && (markup == null || markup.getLength() <= 0)) 
{
                        return null;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

                }
                appInfo.setSource(getAttribute(content, "source"));
                appInfo.setMarkup(markup);
                return appInfo;
        }

========================================================

As you can see if my markup is not empty it will be lost due to the attribute 
"source" is absent.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to