Hi Alessandro, Erik,
I would like to output some html through an xforms:output. Now I've tried to use something like: <xforms:instance id="test"> <instance xmlns="http://www.w3.org/1999/xhtml"> <p><strong>bold</strong>test</p> </instance> </xforms:instance> <xforms:output mediatype="text/html" ref="instance('test')"/> But that doesn't do the trick. The actual case is that I would like to enclose certain words in an xforms:output with <strong> tags. Could you let me know how to do this? I'm using Orbeon in no-script mode. Thanks in advance, Jasper -- 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 |
Hi Jasper,
I think this may do. You can use xxforms:serialize. In the example below, the xml is already xhtml content. Otherwise, you would have to format/transform it into such: <xf:output class="wiki-item" value="xxforms:serialize(atom:content,'html')" mediatype="text/html" xmlns:html="http://www.w3.org/1999/xhtml"/> and a class style may help with formatting. Cheers, Hank On Nov 24, 2010, at 1:56 AM, Jasper Linthorst wrote: > Hi Alessandro, Erik, > I would like to output some html through an xforms:output. Now I've > tried to use something like: > > <xforms:instance id="test"> > <instance xmlns="http://www.w3.org/1999/xhtml"> > <p><strong>bold</strong>test</p> > </instance> > </xforms:instance> > > <xforms:output mediatype="text/html" ref="instance('test')"/> > > But that doesn't do the trick. > > The actual case is that I would like to enclose certain words in an > xforms:output with <strong> tags. > > Could you let me know how to do this? > > I'm using Orbeon in no-script mode. > > Thanks in advance, > Jasper > > -- > 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 NEES@UCSB Earth Research Institute 6707 Ellison Hall 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 |
In reply to this post by Jasper Linthorst
Hi, Jasper!
You need to escape HTML tags. As Hank suggested, you can do this in Orbeon using xxforms:serialize() function. But it may be more compatible to just generate instances in escaped form. Like this: <xforms:instance id="test"> <instance xmlns=""> <p><strong>bold</strong>test</p> </instance> </xforms:instance> Regards, Tambet On 24.11.2010 11:56, Jasper Linthorst wrote: > Hi Alessandro, Erik, > I would like to output some html through an xforms:output. Now I've > tried to use something like: > > <xforms:instance id="test"> > <instance xmlns="http://www.w3.org/1999/xhtml"> > <p><strong>bold</strong>test</p> > </instance> > </xforms:instance> > > <xforms:output mediatype="text/html" ref="instance('test')"/> > > But that doesn't do the trick. > > The actual case is that I would like to enclose certain words in an > xforms:output with<strong> tags. > > Could you let me know how to do this? > > I'm using Orbeon in no-script mode. > > Thanks in advance, > Jasper -- 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 |
Hi Hank, Tambet,
Thanks for the tips! This indeed works great when I use it in an xforms:output, but it doesn't work when I need it in the labels of a select. My case is that I need to produce a list of items in the following form (html):
<span class="xforms-deselected"> <input id="screeningoptions--e11" type="radio" name="screeningoptions" value="AfFaVu5SQJE=">
<label for="screeningoptions--e11"><strong>12</strong> description of item 12</label> </span> <span class="xforms-deselected">
<input id="screeningoptions--e11" type="radio" name="screeningoptions" value="AfFaVu5SQJE="> <label for="screeningoptions--e11"><strong>13</strong> description of item 13</label>
</span> When I use a nested xforms:output I get a:
When I use something like "xxforms:serialize(xxforms:element('strong','test'),'html')" in the value attribute of the label the content is outputted in encoded form.
Any suggestions? Thanks again, Jasper
On Thu, Nov 25, 2010 at 9:53 AM, Tambet Matiisen <[hidden email]> wrote: Hi, Jasper! -- 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 |
My very simple test gave error "HTML not allowed within element:
label". So I suppose it is not supported. While this is reasonable
when appearance of select1 is minimal or compact, is see no problem
when appearance is full.
My test: <xforms:select1 ref="instance('data')" appearance="full"> <xforms:label>Select1</xforms:label> <xforms:item> <xforms:label><xforms:output mediatype="text/html" ref="instance('test')"/></xforms:label> <xforms:value>1</xforms:value> </xforms:item> </xforms:select1> Tambet On 29.11.2010 20:29, Jasper Linthorst wrote: Hi Hank, Tambet, -- 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 |
Is there anybody who can shed some light on why this isn't allowed? Alex, Erik? I guess rewriting these things in the xslt theme or using javascript is the only way to achieve this then. Any other ideas are very welcome!
Thanks in advance, Jasper On Mon, Nov 29, 2010 at 10:09 PM, Tambet Matiisen <[hidden email]> wrote:
-- 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 |
Jasper,
As Hank suggested xforms:serialize() should work with xforms:output. Are you using <strong> to make the font bolder or do you have a real use case for strong tag (so readers can emphasize)? If it is control the style then you could always use css to make the font look bigger. I never ran into this situation but would like to know how to add html content for xforms:label. \B |
H Jasper,
I Agee. I think you will need to specify a style (the attribute is usually passed along to elements the XForms engine creates. Or place it within its own div and override the class. My best guess at this is: div.myclass xforms-trigger-appearance-minimal { font-weight: bold; } Best, Hank On Dec 1, 2010, at 8:02 AM, Binesh Gummadi wrote: > > Jasper, > > As Hank suggested xforms:serialize() should work with xforms:output. > > Are you using <strong> to make the font bolder or do you have a real use > case for strong tag (so readers can emphasize)? If it is control the style > then you could always use css to make the font look bigger. > > I never ran into this situation but would like to know how to add html > content for xforms:label. > > \B > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Embed-html-in-xforms-output-tp3056988p3067566.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > > -- > 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 NEES@UCSB Earth Research Institute 6707 Ellison Hall 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 |
Administrator
|
In reply to this post by Jasper Linthorst
HTML is just not implemented within item/itemset labels. We have an RFE for this:
http://forge.ow2.org/tracker/index.php?func=detail&aid=313231&group_id=168&atid=350207
But it is supported on control labels. Is that what you are observing? -Erik On Wed, Dec 1, 2010 at 6:59 AM, Jasper Linthorst <[hidden email]> wrote:
-- 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 |
My observation exactly. Thanks for pointing out the RFE.
Jasper On Thursday, December 2, 2010, Erik Bruchez <[hidden email]> wrote: > HTML is just not implemented within item/itemset labels. We have an RFE for this: > http://forge.ow2.org/tracker/index.php?func=detail&aid=313231&group_id=168&atid=350207 > > But it is supported on control labels. Is that what you are observing? > -Erik > > On Wed, Dec 1, 2010 at 6:59 AM, Jasper Linthorst <[hidden email]> wrote: > Is there anybody who can shed some light on why this isn't allowed? Alex, Erik? > I guess rewriting these things in the xslt theme or using javascript is the only way to achieve this then. Any other ideas are very welcome! > > > > Thanks in advance,Jasper > > On Mon, Nov 29, 2010 at 10:09 PM, Tambet Matiisen <[hidden email]> wrote: > > > > > > > My very simple test gave error "HTML not allowed within element: > label". So I suppose it is not supported. While this is reasonable > when appearance of select1 is minimal or compact, is see no problem > when appearance is full. > > My test: > <xforms:select1 ref="instance('data')" appearance="full"> > <xforms:label>Select1</xforms:label> > <xforms:item> > <xforms:label><xforms:output mediatype="text/html" > ref="instance('test')"/></xforms:label> > <xforms:value>1</xforms:value> > </xforms:item> > </xforms:select1> > > > Tambet > > On 29.11.2010 20:29, Jasper Linthorst wrote: > Hi Hank, Tambet, > Thanks for the tips! This indeed works great when I use it in > an xforms:output, but it doesn't work when I need it in the > labels of a select. > > > My case is that I need to produce a list of items in the > following form (html): > > > > <span class="xforms-deselected"> > <input id="screeningoptions--e11" type="radio" > name="screeningoptions" value="AfFaVu5SQJE="> > <label for="screeningoptions--e11"><strong>12</strong> > description of item 12</label> > </span> > > > > > <span class="xforms-deselected"> > <input id="screeningoptions--e11" type="radio" > name="screeningoptions" value="AfFaVu5SQJE="> > <label for="screeningoptions--e11"> > > <strong>13</strong> description of item > 13</label> > </span> > > > > > When I use a nested xforms:output I get a: > > > > > Exception at (evaluating itemset) > > > > > > > When I use something like "xxforms:serialize(xxforms:element('strong','test'),'html')" > in the value attribute of the label the content is outputted > in encoded form. > > > > > > > > > Any suggestions? > > > Thanks again, > Jasper > > On Thu, Nov 25, 2010 at 9:53 AM, Tambet > Matiisen <[hidden email]> > wrote: > Hi, Jasper! > > You need to escape HTML tags. As Hank suggested, you can do > this in Orbeon using xxforms:serialize() function. But it > may be more compatible to just generate instances in escaped > form. Like this: > > > <xforms:instance id="test"> > <instance xmlns=""> > > > <p> > -- 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 |
Administrator
|
I don't think it would be really hard to implement, just a matter of
finding the time ;) Or, you might want to give that a shot. -Erik On Fri, Dec 3, 2010 at 7:23 AM, Jasper Linthorst <[hidden email]> wrote: > My observation exactly. Thanks for pointing out the RFE. > > Jasper > > On Thursday, December 2, 2010, Erik Bruchez <[hidden email]> wrote: >> HTML is just not implemented within item/itemset labels. We have an RFE for this: >> http://forge.ow2.org/tracker/index.php?func=detail&aid=313231&group_id=168&atid=350207 >> >> But it is supported on control labels. Is that what you are observing? >> -Erik >> >> On Wed, Dec 1, 2010 at 6:59 AM, Jasper Linthorst <[hidden email]> wrote: >> Is there anybody who can shed some light on why this isn't allowed? Alex, Erik? >> I guess rewriting these things in the xslt theme or using javascript is the only way to achieve this then. Any other ideas are very welcome! >> >> >> >> Thanks in advance,Jasper >> >> On Mon, Nov 29, 2010 at 10:09 PM, Tambet Matiisen <[hidden email]> wrote: >> >> >> >> >> >> >> My very simple test gave error "HTML not allowed within element: >> label". So I suppose it is not supported. While this is reasonable >> when appearance of select1 is minimal or compact, is see no problem >> when appearance is full. >> >> My test: >> <xforms:select1 ref="instance('data')" appearance="full"> >> <xforms:label>Select1</xforms:label> >> <xforms:item> >> <xforms:label><xforms:output mediatype="text/html" >> ref="instance('test')"/></xforms:label> >> <xforms:value>1</xforms:value> >> </xforms:item> >> </xforms:select1> >> >> >> Tambet >> >> On 29.11.2010 20:29, Jasper Linthorst wrote: >> Hi Hank, Tambet, >> Thanks for the tips! This indeed works great when I use it in >> an xforms:output, but it doesn't work when I need it in the >> labels of a select. >> >> >> My case is that I need to produce a list of items in the >> following form (html): >> >> >> >> <span class="xforms-deselected"> >> <input id="screeningoptions--e11" type="radio" >> name="screeningoptions" value="AfFaVu5SQJE="> >> <label for="screeningoptions--e11"><strong>12</strong> >> description of item 12</label> >> </span> >> >> >> >> >> <span class="xforms-deselected"> >> <input id="screeningoptions--e11" type="radio" >> name="screeningoptions" value="AfFaVu5SQJE="> >> <label for="screeningoptions--e11"> >> >> <strong>13</strong> description of item >> 13</label> >> </span> >> >> >> >> >> When I use a nested xforms:output I get a: >> >> >> >> >> Exception at (evaluating itemset) >> >> >> >> >> >> >> When I use something like "xxforms:serialize(xxforms:element('strong','test'),'html')" >> in the value attribute of the label the content is outputted >> in encoded form. >> >> >> >> >> >> >> >> >> Any suggestions? >> >> >> Thanks again, >> Jasper >> >> On Thu, Nov 25, 2010 at 9:53 AM, Tambet >> Matiisen <[hidden email]> >> wrote: >> Hi, Jasper! >> >> You need to escape HTML tags. As Hank suggested, you can do >> this in Orbeon using xxforms:serialize() function. But it >> may be more compatible to just generate instances in escaped >> form. Like this: >> >> >> <xforms:instance id="test"> >> <instance xmlns=""> >> >> >> <p> >> > > > -- > 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 > > -- 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 |
Free forum by Nabble | Edit this page |