Jump to content
  • The JRXMLUtils class should set namespaceAware(true) on the documentbuilderfactory


    tonynys
    Assigned User narcism
    CategoryBug report
    PriorityHigh
    ReproducibilityAlways
    ResolutionFixed
    SeverityMajor
    StatusClosed

    The JRXMLUtils class should set namespaceAware(true) on the documentbuilderfactory.

    When this class creates an instance of the JAXP documentbuilderfactory, it must check the jasper property "net.sf.jasperreports.xml.detect.namespaces" introduced in 4.01

    If it is set to true, the namespace aware must be set to true

     

    This is really needed since I want to use xml datasources with jasper reports AND Ireport . In jasper (command line) it works now fine using XAlan or Jaxen. With IReport however it does not, since the Document objects are constructed without namespace information, and there is no way to set in IReport that it must be like this.

    IReport just passes the file url, and it is Jasper (JRXMLUtils) which constructs the DOM Object without namespace info.

    => Now I hotpatch the jasperreports-4.01.jar file inside IReport with my custom JRXmlUtils class (one line change)

     

    Thanks

     

     

    see also issue http://jasperforge.org/projects/jasperreports/tracker/view.php?id=4500



    User Feedback

    Recommended Comments

    in fact, it should setNamespaceaware() to true if any of the namespace conditions are set

    also with prefix/URI mapping inside jasper reports properties file

    Link to comment
    Share on other sites

    Each method in JRXmlUtils has been overloaded to take the boolean isNamespaceAware parameter and set it on the documentBuilderFactory. Be aware that the default methods call the overloaded ones with isNamespaceAware set to 'false'.
    Link to comment
    Share on other sites


×
×
  • Create New...