[Xml-compile] Re: mixed_elements => 'STRUCTURAL'

Allan Wind allan at insurancedesk.com
Thu Apr 2 06:44:56 BST 2009


On Thu, Apr 2, 2009 at 1:09 AM, Allan Wind <allan at insurancedesk.com> wrote:
> This is how you use the mixed_element option, right?
>
> $schema->compile('WRITER', '{}x', { mixed_elements => 'STRUCTURAL'})

It was obvious to me that OPTIONS is passed in straight:

$schema->compile('WRITER', '{}x', mixed_elements => 'STRUCTURAL')

when doing so both the WRITER and PERL works beautifully.  Love this feature!

> I was expecting the documentation in XML::Compile::Schema (possible
> unreasonable so).  The default value is:
>
> mixed_elements                  'ATTRIBUTES'
>
> and the option is described as:
>
> mixed_elements => CODE|PREDEFINED
>
> The STRUCTURAL keyword is documented in the writer page.
>
> Is mixed_elements supposed to work for the PERL writer?
>
> $schema->template('PERL', "{}x", { mixed_elements => 'STRUCTURAL'});
>
> i.e. it gives:
>
>          # mixed content cannot be processed automatically
>          _ => XML::LibXML::Element->new('Person'), }, ], },
>
>
> /Allan
> --
> Allan Wind
> Software Engineering Manager
> InsuranceDesk.com
> Tel. (781) 932 4700 ext. 190
> http://www.InsuranceDesk.com
>



-- 
Allan Wind
Software Engineering Manager
InsuranceDesk.com
Tel. (781) 932 4700 ext. 190
http://www.InsuranceDesk.com



More information about the Xml-compile mailing list