Embed xforms in a non-xhtml page

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Embed xforms in a non-xhtml page

David Voňka
Dear all,

i'd like to embed xforms in pages generated by a wiki application. My
problem is that
the wiki does not generate a fully valid xhtml. I have some amount of
control over
the html it generates (I can for example change the <html> header so
that it includes
the xforms namespaces), but my level of control is not sufficient to
enforce really
valid xhtml.

Now, is there a way of asking Orbeon to only transform a part of a
xhtml document, say
only giving it the <xf:...> tags defining the form, receiving
html+css+javascript back and
plugin this into a html4 document ?

The wiki system allows me to write plugins in Java, in essence I get
whatever the user enters as input and I'm
supposed to give html code back.  My use-case is that the user writes
something like:
********************
{xform}
<xf:model>
        <xf:instance>
            <data xmlns="">
                <myname>David</myname>
            </data>
        </xf:instance>
</xf:model>
    <xf:input ref="myname">
        <xf:label>What's your name ?</xf:label>
    </xf:input>
{xform}
*********************
and he gets a formula back ... I effectively want Orbeon to transform
just the part between the {xform} tags,
not the whole html document returned by the wiki.



Beg your pardon if this is a stupid question, I'm a complete novice in
Orbeon and also my
xForms expertise is limited. A hint to what I should read is sufficient.

Thanks in advance,
David Vonka


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Embed xforms in a non-xhtml page

Hank Ratzesberger
Hi David,

On Aug 13, 2009, at 6:36 AM, David Voňka wrote:

> Dear all,
>
> i'd like to embed xforms in pages generated by a wiki application. My
> problem is that
> the wiki does not generate a fully valid xhtml. I have some amount of
> control over
> the html it generates (I can for example change the <html> header so
> that it includes
> the xforms namespaces), but my level of control is not sufficient to
> enforce really
> valid xhtml.
Orbeon Forms must process the output of the wiki application. With
some planning and mapping, OF can be a kind of proxy that receives
a request and passes it onto the wiki, then processes the wiki
output and returns a response to the browser.

The url-generator will GET a url and in html mode will process it
with tidy to produce xhtml.  If tidy is able to handle the
html, you will have xml that you can further process to
valid xhtml.

http://www.orbeon.com/ops/doc/processors-generators-url#html-mode

OF will transform this again to deliver html with its own css
and JavaScript markup.  And I'm not saying this will simply
work....  Your pipleline might look like this:

<p:processor name="oxf:request> <!-- get all the url parameters -->

<p:processor name="oxf:xslt"> <!-- create a url to pass to wiki -->

<p:processor name="oxf:url-generator"> <!-- call the wiki app -->

<p:processor name="oxf:xslt"> <!-- transform the wiki to suitable  
xhtml -->

And actually, the last step probably has to be done in
the view part.

If I'm still in the ballpark,
Hank



Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042







--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws