Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

generate-id function ... XSLT need help...

 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way of generating a particular format of id's using this OOTB function?
I was wondering if there is a parameter of some sort that I could set to generate id's with a prefix or something...
I am aware of the custom extension functions that I can write, but looking for an OOTB thingy....
Thanks.
- madhav
 
Rancher
Posts: 1449
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you just place some text in front of the generated ID? Essentially use the generate-id function as is and then modify the output?
This probably didn't help but maybe it'll spark an idea.
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I could if it was that simple. I mean if you are suggesting something like: concat('myPrefix', generate-id(.)). Hope this is what you have in mind, John?
But what I wanted was more like customizing the output of generate-id itself. I prefer not to mess with the generated string, after it is generated. Just the fear of maintaining all the referece id's makes me nervous.
What I was looking for was something I could do before (some preferences or system properties) so that the generated id string is in a format that I want say mmNNNNstr....guess its not possible. I haven't seen any documentation on this.
Anyways.......other suggestions/comments are welcome.
regds.
- madhav
 
John Wetherbie
Rancher
Posts: 1449
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, I was going for the simple concat-type approach. I looked at all the info I could find on generate-id and there don't seem to be any ways to do what you want.
Maybe you could suggest this as a change to the next version? I wonder if you can do that?
 
Did Steve tell you that? Fuh - Steve. Just look at this tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic