[Xml-compile] ANY => [ "Anything", ], - really ?

Anthony Wood bessington at gmail.com
Fri Sep 7 08:56:50 GMT 2012


Hi All

I have this snippet in my template  :

        # is an unnamed complex
        # is optional
        xmlData =3D>
        { # sequence of ANY

          # any element in any namespace
          # occurs 1 <=3D # <=3D unbounded times
          ANY =3D> [ "Anything", ], },

originally trying to load this with e.g.
 {
          '{mods}mods' =3D> [
                            {
                              'xmlns' =3D> 'http://www.loc.gov/mods/v3',
           ... etc...
           },
      ],
}

I get the error :

error: elements for 'any' are XML::LibXML nodes, not HASH(0x20a87da8) at {
http://www.loc.gov/METS/}mets/dmdSec/mdWrap/xmlData#any

So i try e.g.
{
        '{mods}mods' =3D> bless
        [
               # XML as an interpolated string
               "<mods:mods xmlns=3D\"http://www.loc.gov/mods/v3\">
               ... etc ...
               ",
        ],
        'XML::LibXML::NodeList',
},

now i get :

Can't call method "string_value" without a package or object reference at
/usr/lib/perl5/vendor_perl/5.14/i686-cygwin-threads-64int/XML/LibXML/NodeLi=
st.pm
line 108.

I think I must be missing something obvious, what's the approved way to
handle the 'Any =3D> [ "Anything", ],' case

Thanks in advance
Tony Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/xml-compile/attachments/20120907/97=
d0311b/attachment.htm


More information about the Xml-compile mailing list