[xml-compile] namespace prefixes

Wes Young wes at ren-isac.net
Thu Sep 30 21:39:11 GMT 2010


http://code.google.com/p/perl-xml-iodef/source/browse/trunk/lib/XML/IODEF.pm
http://code.google.com/p/perl-xml-iodef/source/browse/trunk/example.pl

0.11_1 is making it's way through the pause index as we speak (takes a  
few hours). The original module was all XML::DOM, but required lots of  
implementation overhead (plus some performance issues), which is why i  
switched to XML::Compile.

On Sep 30, 2010, at 5:24 PM, Mark Overmeer wrote:

> * Wes Young (wes at ren-isac.net) [100930 16:37]:
>> $ perl test.pl
>> <iodef:IODEF-Document xmlns:iodef="urn:ietf:params:xml:ns:iodef-1.0"
>> rock'n... thank you very much!
>>
>> one more question, when building this sort of thing (off of xsd's),
>> is it more "appropriate" to use the XML::Compile::Cache paradigm or
>> is that really for when you have multiple possible schema's (or
>> xsd's) you're trying to wrap?
>
> No, Both XML::Compile::Schema and ::Cache administer multiple
> schemas.
>
> when your application grows larger, you will produce a large number of
> code-refs. And they all need comparible parameters which you have to  
> pass
> around in your program... XML::Compile::Cache does that administration
> for you, You can do
>   $cache->declare(WRITER => $type, @opts);
>   # somewhere else
>   $cache->writer($type)->($doc, $data);
>
> in stead of
>   my $call = $schema->compile(WRITER => $type, @opts);
>   # somewhere else
>   $call->($doc, $data);
>
> It is a nicer abstraction, especially for general purpose  
> implementations
> like CPAN modules.
>
>> This RFC only has a single XSD (and namespace), so it seems to work
>> OK with just ::Schema... want to make sure I'm using
>> (/understanding) it correctly based on your GML examples...
>
> Geo::GML is very complex.  Geo::KML is simpler.  XML::Compile::RPC is
> the easiest, I think.
>
> If you plan to publish your module on CPAN, I'll happily proof-read
> your code ;-)
> -- 
> Regards,
>
>               MarkOv
>
> ------------------------------------------------------------------------
>       Mark Overmeer MSc                                MARKOV  
> Solutions
>       Mark at Overmeer.net                           
> solutions at overmeer.net
> http://Mark.Overmeer.net                   http://solutions.overmeer.net
>

--
Wes
http://claimid.com/wesyoung

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://lists.scsys.co.uk/pipermail/xml-compile/attachments/20100930/36e045b8/PGP.pgp


More information about the Xml-compile mailing list