[ http://wso2.org/jira/browse/MASHUP-436?page=comments#action_13812 ] 
            
Jonathan Marsh commented on MASHUP-436:
---------------------------------------

The issue appears to be acquiring an XML file that has a comment outside it.  I 
currently scrape the latest history.xml file from SVN.  The scraper returns 
text of the form "<!--comment--><history/>".  Feeding that to new XML() causes 
E4X to barf - it can't parse arbitrary XML, namely comments.

A small testcase is this:

  print(new XMLList('<!--comment--><foo><!--comment--></foo>').toXMLString());

It is totally whacked that XML is our story yet we can't easily acquire a 
simple XML document from a URL.  Even my current strategy of scraping seems 
overkill, but if that doesn't work reliably our story of XML being at the heart 
of our offering is not credible.  IIRC we probably have similar problems with 
XML declarations.

Possible solutions:
1) fix new XML() so that it can successfully ignore leading comments
2) fix new XMLList() so that one can parse a top-level XML document.
3) advise users to use XPath to scrape out the document element.
4) provide a separate XML loading method that can handle these cases.

I strongly prefer #4 at this point.

P.S. I simplified the history file so the sample now will work correctly while 
we address the underlying issue.

> Replace sample wso2builds with upgradeChecker in the build
> ----------------------------------------------------------
>
>                 Key: MASHUP-436
>                 URL: http://wso2.org/jira/browse/MASHUP-436
>             Project: WSO2 Mashup Server
>          Issue Type: Bug
>            Reporter: Jonathan Marsh
>         Assigned To: Keith Godwin Chapman
>
> The wso2builds sample is obsolete, and should be replaced in the build by the 
> upgradeChecker.  Both are checked in but only wso2builds is appearing in the 
> distribution.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://wso2.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to