W3C home > Mailing lists > Public > www-forms@w3.org > January 2002

Problems to interpret an attribute value as an Xpath expression

From: T. V. Raman <tvraman@almaden.ibm.com>
Date: Thu, 10 Jan 2002 11:16:33 -0800
Message-ID: <15421.59537.680330.334637@bubbles.almaden.ibm.com>
To: "Roman Huditsch" <roman.huditsch@hico.com>
Cc: <xsl-list@lists.mulberrytech.com>, <www-forms@w3.org>
Think of this as the more general problem of writing an XSL
that in turns produces an XSL transform.

You should be able to do what you need using that approach.
>>>>> "Roman" == Roman Huditsch <roman.huditsch@hico.com> writes:

    Roman> Hi alltogehther!  I have some basic problems,
    Roman> which I hope to be able to solve with your help.
    Roman> Basically what I want is to transform an xform
    Roman> document (not embedded in XHTML) into an html
    Roman> document with all the needed html form controls.
    Roman> I know that it is not the intended way to display
    Roman> xform documents ;), but I have to do it like that
    Roman> in the meantime.  Lets say I have an xform
    Roman> document like the following:

    Roman> <xform:model> <xform:submitInfo
    Roman> id="SubmitInfo1"/> <xform:instance>
    Roman> <applicationform> <applicant> <gender>m</gender>
    Roman> <name>Roman Huditsch</name> ......

    Roman>         </xform:instance> <xform:model>
    Roman> <xform:input
    Roman> ref="/applicationform/applicant[1]/name"/>
    Roman> <xform:input
    Roman> ref="/applicationform/applicant[2]/name"/> ....

    Roman> I'd like to use the value of a ref attribute as
    Roman> an XPath expression in my stylesheet. I want the
    Roman> processor to jump to the specified node and get
    Roman> the value from there.  I used a "normal"
    Roman> <xsl:value-of select="@ref"/> ,but the processor
    Roman> didn't interpret it as an XPath expression but as
    Roman> a string.

    Roman> Does anyone know a method to tell the processor
    Roman> to use a source document's attribute value as an
    Roman> XPath expression in the stylesheet?

    Roman> Best regards, Roman

Best Regards,
T. V. Raman:  PhD (Cornell University)
IBM Research: Human Language Technologies
              Conversational And Multimodal WWW Standards
Phone:        1 (408) 927 2608
Fax:        1 (408) 927 3012
Email:        tvraman@us.ibm.com
WWW:      http://www.cs.cornell.edu/home/raman
PGP:          http://emacspeak.sf.net/raman.asc
Snail:        IBM Almaden Research Center,
              650 Harry Road
              San Jose 95120
Received on Thursday, 10 January 2002 14:17:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:42 UTC