W3C home > Mailing lists > Public > www-forms@w3.org > October 2005

Re: Updating host language attributes

From: <andyh@collegenet.com>
Date: Thu, 27 Oct 2005 12:18:50 -0700
To: Erik Bruchez <erik@bruchez.org>
Cc: www-forms@w3.org
Message-ID: <OF485B77B3.24299AAD-ON882570A7.0069847C-882570A7.006A0C75@collegenet.com>





Erik,

I know this is not your processor, but formsPlayer has a very handy
extension function called fp:serialise( node-set ).

We use this to output instance data that is actually HTML.

eg.

<xf:instance id="iSVG">
      <embed id="SVGReport" src="report.svg" width="100%" height="800px"
type="image/svg+xml"/>
</xf:instance>


<xf:output value="fp:serialise(instance('iSVG'))"/>


And for debugging purposes there is an HTMLserialise function that dumps
instance data as text on to the page.


Both functions have proved to be a essential for us and I hope other
processors consider implementing them.


Andy



                                                                           
             Erik Bruchez                                                  
             <erik@bruchez.org                                             
             >                                                          To 
             Sent by:                  www-forms@w3.org                    
             www-forms-request                                          cc 
             @w3.org                                                       
                                                                   Subject 
                                       Updating host language attributes   
             10/27/2005 11:58                                              
             AM                                                            
                                                                           
                                                                           
                                                                           
                                                                           





All,

It is possible with XForms to switch between areas of the host
language (xforms:switch), repeat them (xforms:repeat), hide them
(relevant property on xforms:group), output and dynamically modify
text (xforms:output), etc. However, there does not appear to be a way
of influencing attribute values of the host language.

For example, with XHTML as host language, you can't update the classes
of an XHTML element or set the value of the name attribute on:

   <xhtml:a name="..."/>

Besides modifying attribute values, you would like sometimes also to
simply add or remove an attribute.

Following the template of my previous email, these are my questions:

1. How do people address this today with XForms? Is there a way of
    doing this purely based on the XForms 1.0 specification (I don't
    think so)? If not, are there workarounds (hacks involving
    Javascript come to mind)?

2. If the answer to #1 above is "no" or "here is a way, but it's
    really a dirty hack":

    2.1. Is the WG working on addressing this?

    2.2. Are there extensions suggested or implemented by existing
         XForms engines that address this?

Thanks,

-Erik
Received on Thursday, 27 October 2005 19:18:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:02 GMT