xsl-list
[Top] [All Lists]

Re: [xsl] Generate identifier

2009-12-29 10:56:30
At 2009-12-29 07:13 -0800, Vladimir Nesterovsky wrote:
I need to convert a string into an identifier.

Does that string include white-space?

Yes. Original function handles this.

Do your identifiers have to be unique or are you 
allowed to create the same identifier for two different input strings?

Same identifier for different input is acceptable.

Earlier I was using the following function:
...
Now, I have to build a name with only containing [A-Za-z0-9] only.

That is very limiting ... the value space for 
names in XML includes hyphen and underscore, both 
of which would be handy ... are you sure those two characters are not 
allowed?

Pretty sure.
cobol-word = [A-Za-z0-9]+ ([\-]+ [A-Za-z0-9]+)*

I hope this gives you some ideas.

In fact conversation itself gave an idea.
If nothing more, I'll build a transliteration static table, which I'll use 
to make identifiers.

Thanks.
--
Vladimir Nesterovsky
http://www.nesterovsky-bros.com/




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>