Hello Greg,
> Hi,
>
> I'm trying to use some Xforms-based pages for a little project at my
> job place. However, I'm having some trouble with the output element.
>
> The Setup:
>
> I have a set of elements in my instance data that contain (x)HTML markup.
>
> I want to conditionally show these elements (with their markup
> rendered) in the Xform based on some form selections.
>
> Getting an output element to show plain text is a snap. But I'm having
> trouble getting HTML to come through.
>
> The Questions:
>
> - Does support the mediatype attribute for output elements?
>
application/xhtml+xml, image/svg+xml and image/* are supported by XSLTForms.
>
> - Is XsltForms an Xform 1.0 or 1.1 implementation?
>
XSLTForms is an XForms 1.1 implementation with some XForms 2.0 features.
XSLTForms is not 100% compliant because of restrictions due to
client-side limitations or, just, lack of time for "minor" features and
higher-priority extensions (RTE,...).
>
> - What do I need to do to the markup content in the instance to make
> it compatible for display (CDATA, encode HTML entities, etc...)?
>
XSLTForms, previously, was able to produce XHTML or HTML. Since XHTML is
not well appreciated by browsers, it now generates HTML. As a
consequence, output control is implemented using .innerHTML property:
* application/xhtml+xml can also be used for HTML tags soup (XSLTForms
does not check whether the content is valid or not)
* content is treated as serialized (X)HTML which means that it is just
text (not CDATA) from the XML point of view to be serialized with
< and > entities for tags
* an instance element has to be serialized with serialize(node) XPath
function
What do you think?
Thanks!
--Alain
|