- From: Dan Dennedy <DDennedy@digitalbang.com>
- Date: Thu, 22 Aug 2002 10:40:22 -0400
- To: <dagfinn.reiersol@opoint.com>, "Roger Perttu" <roger.perttu@easit.se>, <www-forms@w3.org>
> From: Dagfinn Reiersøl > > I'm no XSLT guru, but it seems to me that the basic problem > with simply using > XSLT is placing the values from the Xforms instance corectly > in the HTML > code. It seems to me a general solution would require the > ability to generate > and evaluate XPath expressions dynamically. Limiting yourself Roger Perttu somewhat answered this in his most recent reply; however, it was not perhaps obvious that it addresses this issue. This is accomplished by using xslt processors that support componentized extensions ala JavaBeans or COM. The component is bound to a namespace prior to invoking the processor. Then, within XSL-T you can invoke methods passing nodesets, and the method can return some scalar value. For example, here is one that I call in my MSXML-based processor. This comes from my xforms:input template that generates an xhtml input element: <xsl:template match="xforms:input"> ... <input value="{dbxfm:getValueByRef(@model, @ref)}" ... /> ... </xsl:template> And the function prototype is (in Visual Basic): Public Function getValueByRef(ByVal model As MSXML2.IXMLDOMNodeList, ByVal ref As MSXML2.IXMLDOMNodeList) As Variant
Received on Thursday, 22 August 2002 10:41:09 UTC