AW: AW: concatenating user input and special characters

Hello,

Unfortunaltely I could only try your xforms:bind statement now and it procduced an error within X-Smiles (MLFC Error - java.lang.NullPointerException), although I don't know why.
My code looks like:

		<xforms:model schema="XTM-Schema.xsd">
			<xforms:submission id="submit1" method="post" action="http://127.0.0.1:8080/tm.jsp" version="1.0" omit-xml-declaration="yes"/>
			<xforms:instance id="xtm">
				<topicMap xmlns="http://www.topicmaps.org/xtm/1.0/" xmlns:xlink="http://www.w3.org/1999/xlink">
					<topic id="">
						<instanceOf>
							<topicRef xlink:href=""/>
						</instanceOf>
						<baseName>
							<baseNameString></baseNameString>
						</baseName>
						<occurrence>
							<instanceOf>
								<topicRef xlink:href=""/>
							</instanceOf>
							<resourceRef xlink:href=""/>
						</occurrence>
						<occurrence>
							<instanceOf>
					     		<topicRef xlink:href="#"/>
							</instanceOf>
							<resourceData></resourceData>
						</occurrence>
					</topic>
					<association>
						<instanceOf>
							<topicRef xlink:href=""/>
						</instanceOf>
						<member>
							<roleSpec>
								<topicRef xlink:href=""/>
							</roleSpec>
							<topicRef xlink:href=""/>
						</member>
						<member>
							<roleSpec>
								<topicRef xlink:href=""/>
							</roleSpec>
							<topicRef xlink:href=""/>
						</member>
					</association>
				</topicMap>
			</xforms:instance>
			<xforms:bind nodeset="//@xlink:href" calculate="if(starts-with(.,'#'),.,concat('#',.))"/>
		</xforms:model>

Please help me.

wbr,
Roman

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


Mikko

Thanks for putting me straight. I just tried it, and it does work fine. Whether or not is any use to Roman is another matter.

I need to read the CR more carefully, even though I am an end user :)

All the best

Mark

> -----Original Message-----
> From: Mikko Honkala [mailto:honkkis@tml.hut.fi]
> Sent: 03 December 2002 14:36
> To: www-forms@w3.org
> Cc: Roman Huditsch; Mark Seaborne
> Subject: Re: AW: concatenating user input and special characters
> 
> 
> To further clarify:
> 
>   <xfm:bind nodeset="//@xlink:href[starts-with(., '#') = false]" 
> calculate="concat('#', .)"/>
> 
> does not mean that you run this calculation once per each node. It
> means that you attach this calculation to be run _EVERY TIME_ the 
> dependent nodes change.
> 
> So you could try something along the lines of
> 
> <xfm:bind nodeset="//@xlink:href" calculate="if(starts-with(., 
> '#'),.,concat('#', .))"/>
> 
> Note: the above probably has errors, I did not have a chance 
> to try it.
> 
> -mikko
> 
> 

Received on Thursday, 5 December 2002 04:04:02 UTC