ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-xml
perl-xml
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved