Hi,
i am using Spring AS for apps that are not just in the web-browser but on the desktop (both AIR and within swf2exe apps like MDM Zinc). I need to load a config XML file that does "imports" of other relative files to the main config file. I am having issues where the import element does not seem to work.
Anyways, I've been constructing the context as follows.
Code:var ctx:XMLApplicationContext = new XMLApplicationContext(); ctx.addConfigLocation("file:///someDir/someDir2/myconfig.xml"); ctx.load();
Contents of myconfig.xml
Code:<objects....> <object id="myObject" class="my.package.MyObject"/> <import file="myOtherSubConfig.xml"/> </objects>
Contents of myOtherSubConfig.xml which lives in the same directory as myconfig.xml above.
Code:<objects....> <object id="myOtherObject" class="my.package.MyOtherObject"/> </objects>
After booting up Spring AS, I can successfully retrieve "myObject" however "myOtherObject" is null. I have also tried specifying the following with no success either.UPDATE:Code:<import file="file:///someDir/someDir2/myOtherSubConfig.xml"/>
The top of my config XML had this:
When the above header is in the objects tag the e4x "xml.descendants("import")" call within XMLObjectFactory._addImportLocationsIfAny() yields zero results. When I remove all the xmlns/schema info OUT of the <objects> tag. The xml.descendants("import") works fine. I took this example "objects" element declaration right out of the the first annotation within the Spring/Prana XSD file @ http://www.pranaframework.org/schema...pt-objects.xsdCode:<objects xmlns="http://www.pranaframework.org/objects" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.pranaframework.org/objects http://www.pranaframework.org/schema/objects/spring-actionscript-objects.xsd">
Is this an E4X bug or something else?


Reply With Quote