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

AW: concatenating user input and special characters

From: Roman Huditsch <roman.huditsch@hico.com>
Date: Tue, 3 Dec 2002 15:00:12 +0100
Message-ID: <0C79A363CB0321418927D0CB1AD0403C29A67F@hicoetsrv000006.hico.local>
To: "Mark Seaborne" <MSeaborne@origoservices.com>, <www-forms@w3.org>


So I assume that 

<xfm:bind nodeset="//@xlink:href[starts-with(., '#') = false]" calculate="concat('#', .)"/>

does the same for every attribute xlink:href within my whole xforms instance, right?
Thanks for the help.


-----Ursprüngliche Nachricht-----
Von: Mark Seaborne [mailto:MSeaborne@origoservices.com]
Gesendet: Dienstag, 3. Dezember 2002 14:56
An: Roman Huditsch; www-forms@w3.org
Betreff: RE: concatenating user input and special characters


My suggestion below really is a guess on my part, so if I am wrong I hope someone will say so!

It is probably not what you had in mind, but you could try something like:

	<xfm:bind nodeset="xlink:href[starts-with(., '#') = false]" calculate="concat('#', .)"/>

I just tried this out in X-Smiles and it had the effect of adding the '#' character to the start of any element's value not already starting with '#'.  Under some circumstances a second '#' does get added, but I am unsure whether this is due to my code, or a bug in X-Smiles!

If you wanted to hide the # character, then this doesn't do the job (it just means that the user doesn't have to remember the # character), and I can't think of anything that does, off hand. You could always just forget the # character altogether, and do a bit of post-processing (via XSLT or whatever). 

All the best


-----Original Message-----
From: Roman Huditsch [mailto:roman.huditsch@hico.com]
Sent: 03 December 2002 09:19
To: www-forms@w3.org
Subject: concatenating user input and special characters

Hello again,

I need to add XLink information to my xforms instance data like 

    <link xlink:href="#website"/>

whereas the "website"-part should be the input of the user. How can I attach the "#" character to this information? 

Received on Tuesday, 3 December 2002 09:00:51 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:07 UTC