Hi all,

xi:include problem, what is proper way to make validators/autoload/etc 
file to work proper with xi:include of
external xml file/files? To avoid dublicate code many times.
I generated a new project with agai 1.0.0 beta6. He works until i try 
xi:include external file.
I tried autoload code from ADT demo to place in this generated project, 
but still errors.

my system:
PHP Version 5.2.6-2ubuntu4
libxml Version 2.6.32
libxml2 Version 2.6.32
Agavi 1.0.0.0 beta6
libxslt Version 1.1.24
libxslt compiled against libxml Version 2.6.32
EXSLT enabled


my app/Default/validate/Index.xml looks like:
------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<ae:configurations parent="%core.module_dir%/Default/config/validators.xml"
xmlns="http://agavi.org/agavi/config/parts/validators/1.0";
xmlns:xi="http://www.w3.org/2003/XInclude";
xmlns:ns="http://agavi.org/agavi/config/parts/validators/1.0";
xmlns:ae="http://agavi.org/agavi/config/global/envelope/1.0";>
<ae:configuration>
<validators>
<xi:include href="failas.xml" xpointer="xpointer(/validators/*)">
<xi:fallback>
<validators>
</validators>
</xi:fallback>
</xi:include>
</validators>
</ae:configuration>
</ae:configurations>


and the included file looks like:
------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<validators xmlns:ns="http://agavi.org/agavi/config/parts/validators/1.0";
xmlns:ae="http://agavi.org/agavi/config/global/envelope/1.0";>
<validate class="number" name="some_id_error" required="true">
<arguments>
<argument>some_id</argument>
</arguments>
<ns:errors>
<ns:error>__Nenurodėte Id.__</ns:error>
</ns:errors>
<ae:parameters>
<ae:parameter name="min">1</ae:parameter>
</ae:parameters>
</validate>
</validators>

here included file is with namespaces, but i tryed and without them but 
still errors errors errors.. autoload.xml files dont work too.. :/


Here is error output:
-----------------------------------------------------------
RELAX NG validation of configuration file 
"/var/www/www-xiinclude/app/modules/Default/validate/Index.xml" failed:
RELAX NG validation with 
"/usr/local/share/php/agavi/config/rng/validators.rng" failed due to the 
following errors:
Line 0: Extra element validators in interleave
Line 3: Invalid sequence in interleave
Line 3: Element configuration failed to validate content
Line 0: Extra element configuration in interleave
Line 3: Element configurations failed to validate content


_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to