W3C home > Mailing lists > Public > public-powderwg@w3.org > November 2008

POWDER to POWDER-BASE transformation script

From: Phil Archer <phil@philarcher.org>
Date: Thu, 13 Nov 2008 15:07:12 +0000
Message-ID: <491C42A0.7040407@philarcher.org>
To: Public POWDER <public-powderwg@w3.org>

Hot on the heels of the validator update, I've used much of the same 
code to create a POWDER to POWDER-BASE transformation script.

It can accept POWDER docs through two ways - either as the URI of a 
POWDER doc or as part of the HTTP request (either GET or POST - although 
I admit I haven't proved the latter yet).

The URI is http://keg.icra.org/cgi-bin/pdr_to_base.cgi

The parameters for the query string are either uri or powder (see [1] 
and [2]).

I've used POWDER-processor-like error reporting - i.e. you get some 
RDF/XML back if there's an error.

This work follows on from the recent discussions about the fact that to 
achieve this in Perl has been relatively easy (lots of regular 
expressions and all that) but would require XSLT2 techniques if we 
relied solely on that route.

As with the validator, once Kevin's got the POWDER-BASE to POWDER-S XSLT 
done, I can try and add that.

Cheers

Phil.



[1] 
http://keg.icra.org/cgi-bin/pdr_to_base.cgi?uri=http://keg.icra.org/powder_examples/example_2_14_corrected.xml
[2] 
http://keg.icra.org/cgi-bin/pdr_to_base.cgi?powder=%3C%3Fxml+version%3D%221.0%22%3F%3E%0D%0A%3Cpowder+xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2007%2F05%2Fpowder%23%22+%0D%0A++++++++xmlns%3Aex%3D%22http%3A%2F%2Fexample.org%2Fvocab%23%22%3E%0D%0A%0D%0A++%3Cattribution%3E%0D%0A++++%3Cissuedby+src%3D%22http%3A%2F%2Fauthority.example.org%2Fcompany.rdf%23me%22+%2F%3E%0D%0A++++%3Cissued%3E2007-12-14T00%3A00%3A00%3C%2Fissued%3E%0D%0A++++%3Cabouthosts%3Eexample.com%3C%2Fabouthosts%3E%0D%0A++%3C%2Fattribution%3E%0D%0A%0D%0A++%3Col%3E%0D%0A++++%3Cdr%3E%0D%0A++++++%3Ciriset%3E%0D%0A++++++++%3Cincludehosts%3Eexample.com%3C%2Fincludehosts%3E%0D%0A++++++++%3Cincludepathstartswith%3E%2Ffoo%3C%2Fincludepathstartswith%3E%0D%0A++++++%3C%2Firiset%3E%0D%0A%0D%0A++++++%3Cdescriptorset%3E%0D%0A++++++++%3Cex%3Acolor%3Eblue%3C%2Fex%3Acolor%3E%0D%0A++++++%3C%2Fdescriptorset%3E%0D%0A++++%3C%2Fdr%3E%0D%0A%0D%0A++++%3Cdr%3E%0D%0A++++++%3Ciriset%3E%0D%0A++++++++%3Cincludehosts%3Eexample.com%3C%2Fincludehost
s%3E%0D%0A++++++%3C%2Firiset%3E%0D%0A+%0D%0A++++++%3Cdescriptorset%3E%0D%0A++++++++%3Cex%3Acolor%3Ered%3C%2Fex%3Acolor%3E%0D%0A++++++%3C%2Fdescriptorset%3E%0D%0A++++%3C%2Fdr%3E%0D%0A++%3C%2Fol%3E%0D%0A%0D%0A%3C%2Fpowder%3E



-- 

Please note my new e-mail address. My ICRA/FOSI e-mail addresses will 
not function after the end of November.

Phil Archer
w. http://philarcher.org/
Received on Thursday, 13 November 2008 15:08:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:42:13 GMT