[xml-compile] namespace prefixes

Wes Young wes at ren-isac.net
Fri Oct 1 13:55:51 GMT 2010


On Sep 30, 2010, at 6:32 PM, Mark Overmeer wrote:

> You could also add an worked-out example to the distribution. That
> will show the possibilities of the HASH far more readible than
> Data::Dumper.
>
>   print $schema->template(PERL => $type);
>
> The result is quite large, but even better understandable than the  
> schema.
> Even though this is one of the cleanest schemas I have encountered.
> Use the XML::Compile version I released today for the nicest result.

oh neat. I hadn't had a chance to really look over that template stuff  
yet. The guys that wrote this spent a few years on this schema (IETF  
RFC 5070). We're looking to expand on it in the cyber-crime space over  
the next few years, which is why we moved towards ::Compile (figured  
it might make life easier than re-implementing these with XML::DOM  
down the road). Between this and generateDS.py, we found a good combo  
of tools to help us generate code around these standards.

> Another hint: this schema does not use '-' a lot in names (only a few
> attributes which start with 'ext-'), however those bastards make life
> hard: those HASH keys must get quoted, where others do not need it.
> When you use
>   $s->compile(  .... , key_rewrite => 'UNDERSCORES');
> those dashes get replaced by underscores. Much easier. (Pass the same
> options to the template() call.

noted. I had messed around a little with the key_rewrite stuff (esp  
with the NIEM stuff I asked about before), but that makes sense (i  
usually quote most hash stuff, only because it can be a PITA). So  
didn't think too much about it here just yet.

> Will your module have an "in()" method as well?

yup. just wanted to get it to 'compile' first =)


--
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/20101001/c354e204/PGP.pgp


More information about the Xml-compile mailing list