Adding Namespaces in a Filter
by Calbazana, Al other posts by this author
Jul 11 2002 12:54AM messages near this date
view in the new Beta List Site
Re: libxml and (X)HTML documents
|
Re: Adding Namespaces in a Filter
I'd like to add a namespace to a few elements during a pass through a SAX
Filter. I am not getting the results that I expect. When I try to add a
namespaces using
...
my $XFormsNamespace = "xforms";
my $XFormsURI = http://www.w3.org/2002/01/xforms
<http://www.w3.org/2002/01/xforms> ;
$el-> {Name}= $XFormsNamespace . ":" . $obj->{"cntrl_type"} ; #
Not sure if this is necessary...
$el-> {Attributes} = $atts;
$el-> {Prefix} = $XFormsNamespace;
$el-> {NamespaceURI} = $XFormsURI;
$el-> {LocalName}=$obj->{"cntrl_type"};
$self-> SUPER::start_element($el);
...
I see no namespace in my output.
<selectOne class="" ref="10" selectUI="listbox">
<caption> Check any of the following that apply to you. If nothing
applies, skip to the next question.</caption>
<item>
<caption> 1</caption>
<value> 1</value>
</item>
...
</selectOne>
should be...
<xforms:selectOne class="" ref="10" selectUI="listbox">
<xforms:caption> Check any of the following that apply to you. If nothing
applies, skip to the next question.</caption>
<xforms:item>
...
</xforms:selectOne>
Not sure what I am doing wrong here...
Thanks,
Al
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
Attachments:
unknown1
Thread:
Calbazana, Al
Robin Berjon
Aaron Straup Cope
|