Hi again, still dont get xi:include to work proper. Somthing i still missing. this is app/Default/validate/Index.xml ----------------------------------------------------------------------- <?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="./indexsnip.xml" xpointer="xmlns(a=http://agavi.org/agavi/1.0/validator) xpointer(/configurations/validators/*)"> <fallback> <configurations /> </fallback> </xi:include> </validators> </ae:configuration> </ae:configurations>
including this file Indexsnip.xml ---------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <configurations xmlns:ns="http://agavi.org/agavi/config/parts/validators/1.0" xmlns:ae="http://agavi.org/agavi/config/global/envelope/1.0"> <validators> <validate class="number" name="some_id_error" required="true" translation_domain=".layout"> <arguments> <argument>some_id</argument> </arguments> <ns:errors> <ns:error>__Nenurodėte šalies.__</ns:error> </ns:errors> <ae:parameters> <ae:parameter name="min">1</ae:parameter> </ae:parameters> </validate> </validators> </configurations> ------------------------------------------- got errors : 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 [EMAIL PROTECTED] rašė: > Send users mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.agavi.org/mailman/listinfo/users > or, via email, send a message with subject or body 'help' to > [EMAIL PROTECTED] > > You can reach the person managing the list at > [EMAIL PROTECTED] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of users digest..." > > > Today's Topics: > > 1. xi:include external xml files problem (Liutauras) > 2. Re: xi:include external xml files problem (David Z?lke) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 03 Dec 2008 14:20:09 +0200 > From: Liutauras <[EMAIL PROTECTED]> > Subject: [Agavi-Users] xi:include external xml files problem > To: [email protected] > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=UTF-8; format=flowed > > 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 > > > > > ------------------------------ > > Message: 2 > Date: Wed, 3 Dec 2008 20:14:21 +0100 > From: David Z?lke <[EMAIL PROTECTED]> > Subject: Re: [Agavi-Users] xi:include external xml files problem > To: Agavi Users Mailing List <[email protected]> > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="utf-8" > > The included file is incorrect. Some elements (<validators>, among > others) are in no namespace. > > You also need to change the XInclude to register namespaces > (xmlns(prefix=uri)) you want to query and, of course, the xpointer > expression (sample app's output_types.xml does that). > > Fix that and it will work without any problems. > > Cheers, > > - David > > > > > Am 03.12.2008 um 13:20 schrieb Liutauras: > > >> 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 >> > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: smime.p7s > Type: application/pkcs7-signature > Size: 2474 bytes > Desc: not available > Url : > http://lists.agavi.org/pipermail/users/attachments/20081203/839910a0/attachment-0001.bin > > > ------------------------------ > > _______________________________________________ > users mailing list > [email protected] > http://lists.agavi.org/mailman/listinfo/users > > > End of users Digest, Vol 26, Issue 1 > ************************************ > > _______________________________________________ users mailing list [email protected] http://lists.agavi.org/mailman/listinfo/users
