[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: Indirection


Subject: Re: Indirection
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 12 Oct 2000 10:31:50 GMT

> 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



Current Thread
  • Indirection
    • DPawson - Wed, 11 Oct 2000 10:52:12 +0100
      • <Possible follow-ups>
      • DPawson - Wed, 11 Oct 2000 12:28:45 +0100
        • David Carlisle - Thu, 12 Oct 2000 10:31:50 GMT <=
      • Kay Michael - Wed, 11 Oct 2000 15:10:03 +0100