[Xml-compile] What is $action in XML::Compile::Tester synopsis
Mark Overmeer
mark at overmeer.net
Mon Nov 24 14:20:58 GMT 2008
* Mark Overmeer (mark at overmeer.net) [081124 15:12]:
> <p:book xmlns:p="http://mybookshelf"/>
>
> the element's name is:
> namespace=http://mybookshelf localname=book
>
> You need this pair to refer to an element: "book" is defined in
> http://mybookshelf (a schema with targetNamespace http://mybookshelf)
I should have added the following.
Handling ($ns, $name) pairs is awkward, and therefore the commonly
used "{$ns}$name" is used. You can create these strings by hand,
but it is preferred to use
use XML::Compile::Util qw/pack_type/;
my $type = packtype $ns, $name;
where
$ns = 'http://mybookshelf';
$name = 'book';
then
$type = "{http://mybookshelf}book";
--
Regards,
MarkOv
------------------------------------------------------------------------
Mark Overmeer MSc MARKOV Solutions
Mark at Overmeer.net solutions at overmeer.net
http://Mark.Overmeer.net http://solutions.overmeer.net
More information about the Xml-compile
mailing list