Thinking some more about my problems using RDFa with Orbeon Forms, I
realize that the new support for AVT's only solves part of my problem. (It solves the part I was having a hard time creating a workaround for using my xf:output trick, so it's still very much appreciated.) If I use an HTML element to wrap a xf:output element, then the object of my triple will be the complete generated HTML that the xf:output is replaced with. I can work around this by using @content to link to the same instance data that my xf:output would be linking to. This is sub-optimal because it would increase the size of the page and add additional complexity in authoring. If I try to simply put one or more of the RDFa attributes directly on the xf:output element, then the converter simply strips out those attributes. What I would like to see done is take those attributes when they are attached to an XForms element and copy them to the element that surrounds where the value of the XForms element would go. Additionally, it would be nice to have similar processing applied to xf:label, and the label's span element. A list of RDFa attributes can be found at: http://www.w3.org/TR/rdfa-syntax/#s_metaAttributes Thank You, Daniel E. Renfer http://kronkltd.net/ -- 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 signature.asc (258 bytes) Download Attachment |
Administrator
|
Daniel,
On Wed, Mar 5, 2008 at 6:35 PM, Daniel E. Renfer <[hidden email]> wrote: > What I would like to see done is take those attributes when they are > attached to an XForms element and copy them to the element that > surrounds where the value of the XForms element would go. I am not sure to understand what you would like to do. Could you maybe give us an example? Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.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 |
Alessandro Vernet wrote:
> Daniel, > > On Wed, Mar 5, 2008 at 6:35 PM, Daniel E. Renfer <[hidden email]> wrote: >> What I would like to see done is take those attributes when they are >> attached to an XForms element and copy them to the element that >> surrounds where the value of the XForms element would go. > > I am not sure to understand what you would like to do. Could you maybe > give us an example? > > Alex <xf:output ref="foaf:firstName"> <xf:label>First: </xf:label> </xf:output> translates into something like this: <label for="xforms-element-164" class="xforms-label xforms-case-selected">First: </label> <div id="xforms-element-164" class="xforms-control xforms-output">Daniel</div> Then I would like something like this: <xf:output ref="foaf:firstName" about="http://kronkltd.net/data/foaf.rdf#duck1123" property="foaf:firstName"> <xf:label>First: </xf:label> </xf:output> to produce this: <label for="xforms-element-164" class="xforms-label xforms-case-selected">First: </label> <div id="xforms-element-164" class="xforms-control xforms-output" about="http://kronkltd.net/data/foaf.rdf#duck1123" property="foaf:firstName">Daniel</div> Which would allow a RDFa parser to read the triple: <http://kronkltd.net/data/foaf.rdf#duck1123> foaf:firstName "Daniel". Doing this would basically involve identifying non-XForms attributes on an XForms element and moving them to the div surrounding the value. My current workaround is to do this: <xf:output mediatype="text/html" value="concat( '<span about="http://kronkltd.net/data/foaf.rdf#duck1123" property="foaf:firstName">', foaf:firstName, '</span>')"> <xf:label>First: </xf:label> </xf:output> Which I'm sure you can see how that can get to be quite a bit much when every output on your page has to do that. Not to mention the fact that if I need to generate an element that way, then I must use the same method to generate all of it's children. I hope that helps explain my issue. Daniel E. Renfer http://kronkltd.net/ -- 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 signature.asc (258 bytes) Download Attachment |
Administrator
|
Daniel,
On Wed, Mar 5, 2008 at 9:37 PM, Daniel E. Renfer <[hidden email]> wrote: > Then I would like something like this: > > <xf:output > ref="foaf:firstName" > about="http://kronkltd.net/data/foaf.rdf#duck1123" > property="foaf:firstName"> > <xf:label>First: </xf:label> > </xf:output> > > to produce this: > > <label > for="xforms-element-164" > class="xforms-label xforms-case-selected">First: </label> > <div > id="xforms-element-164" > class="xforms-control xforms-output" > about="http://kronkltd.net/data/foaf.rdf#duck1123" > property="foaf:firstName">Daniel</div> can do this without AVTs. Just put on the XForms control an attribute in the XHTML namespace; that attribute will be copied (with no namespace) in the HTML produced by Orbeon Forms. E.g.: <xforms:output value="..." xhtml:about="http://kronkltd.net/data/foaf.rdf#duck1123"> Will get you: <span about="http://kronkltd.net/data/foaf.rdf#duck1123" class="xforms-control xforms-output" id="...">...</span> Now this might not always work for you as you can't really control on which element the attribute is added. You're OK with <xforms:output>, but this might become more of a concern with other controls, such as <xforms:input> which generate more complicated HTML. Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.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 |
Alessandro Vernet wrote:
> Daniel, > > On Wed, Mar 5, 2008 at 9:37 PM, Daniel E. Renfer <[hidden email]> wrote: >> Then I would like something like this: >> >> <xf:output >> ref="foaf:firstName" >> about="http://kronkltd.net/data/foaf.rdf#duck1123" >> property="foaf:firstName"> >> <xf:label>First: </xf:label> >> </xf:output> >> >> to produce this: >> >> <label >> for="xforms-element-164" >> class="xforms-label xforms-case-selected">First: </label> >> <div >> id="xforms-element-164" >> class="xforms-control xforms-output" >> about="http://kronkltd.net/data/foaf.rdf#duck1123" >> property="foaf:firstName">Daniel</div> > > OK, I understand; thank you for the example. This is an easy one: you > can do this without AVTs. Just put on the XForms control an attribute > in the XHTML namespace; that attribute will be copied (with no > namespace) in the HTML produced by Orbeon Forms. E.g.: > > <xforms:output value="..." > xhtml:about="http://kronkltd.net/data/foaf.rdf#duck1123"> > > Will get you: > > <span about="http://kronkltd.net/data/foaf.rdf#duck1123" > class="xforms-control xforms-output" id="...">...</span> > > Now this might not always work for you as you can't really control on > which element the attribute is added. You're OK with <xforms:output>, > but this might become more of a concern with other controls, such as > <xforms:input> which generate more complicated HTML. > > Alex Thanks for that tip. Combined with the AVT support, this should make my templates a lot cleaner. I must admit I hadn't tried putting the attributes in the XHTML namespace. /me goes off to simplify his stylesheet Daniel E. Renfer http://kronkltd.net/ -- 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 signature.asc (258 bytes) Download Attachment |
Free forum by Nabble | Edit this page |