This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Indirection



> My problem is that, as you say, the id value in topic
> is extremely fragile.

what I don't see is why you are using generate-id at all rather than
just adding ids when you add the data.


wouldn't


<topic id="Cara" types="wife mother">
<topname><basename>Cara</basename></topname>
</topic>

be clearer than 

<topic id="N12345" types="wife mother">
<topname><basename>Cara</basename></topname>
</topic>


generate-id() is useful at times but isn't really much use at gereating
persistent ids that need to survive after the current process has
finished.

If I understand your problem correctly (which is a false premise,
so this is bound to be a true statement) then you could just do a
one-off transform to give your existing data sensible id's (eg the name
suffixed by a number to make it unique Cara, Cara2, Cara3, ...
and then just add suitable ids when you add new data.

That way you are not having to second guess what id the system
generated.

David


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]