[Petal] Minor namespace support bug

Kurt Stephens kstep at pepsdesign.com
Thu Jan 30 19:29:09 GMT 2003


> This template forces you to hack into Petal's internals by manually
> setting $Petal:NS and $Petal:NS_URI, which is __VERY BAD__ :)
>
> Instead, use Petal namespace support to your advantage: (Instead of
> using petal-temp I'll use the 'petal-meta' prefix)
>
>   [jhiver at frogette test_ns_attributes]$ cat test_rightWayOfDoing.xml
>   <foo xmlns:petal="http://purl.org/petal/1.0/willBeReplaced"
>        xmlns:petal-meta="http://purl.org/petal/1.0/"
>        petal-meta:attributes="xmlns:petal
string:http://purl.org/petal/1.0/">
>
>     <bar baz="default"
>          petal:attributes="baz default"
>          petal-meta:attributes="petal:attributes string:baz ${baz_value}"
/>
>
>   </foo>

Very cool solution!  Should have thought of that myself ;-)

Best Regards,

Kurt Stephens
kstep at pepsdesign.com




More information about the Petal mailing list