On Tue, Dec 8, 2009 at 12:14 PM, Jason Grout
<jason-s...@creativetrax.com> wrote:
> William Stein wrote:
>
>>> I guess what I'm advocating is that it would be useful for the
>>> underlying ID to be (probabilistically) globally unique, not just
>>> unique for a user or a specific notebook server.
>>
>> (1) How is that useful?
>> (2) Why don't web pages, wiki pages (?), latex documents, etc. have
>> such a unique id?
>
>
> How would either of you deal with the following situation:
>
> I have Rob Beezer's linear algebra book in Sage Worksheets, with
> hundreds of cross-references between the worksheets.  I want to upload
> two copies of the book into my notebook server.
>

The design I have in mind I came up with while flying cross-country
with Rob Beezer and his book :-)

> Where do the crossreferences point?

I wouldn't even think about importing a book until I've implemented
nested worksheets (just like nested web pages).
So here's what happens:

(1) You upload the first book and the absolute version of the labels
are all of the form

   beezer/intro/label1
   beezer/ch1/label1
   beezer/ch1/label2

etc.  Within the book, the worksheets just use labels of the form
"intro/label1", "ch1/label1", etc., -- they never explicitly mention
"beezer".   The worksheets themselves know they are children of the
"beezer" worksheet (which could be a cover page or contents page).

(2) When you upload the second copy of the book, you will receive a
dialog that says "The 'beezer' top level label is already defined.
Name for top level label of new worksheet: [beezer2]."  You can then
just accept "beezer2" or change it to anything you want.


>  Do I get an error and have to
> manually reassign all possible labels on the second version of the book?
>

Nope.

> I can see Robert's idea working better, in that it sees that there are
> conflicts, so it regenerates "unique" ids for all worksheets in the
> second copy of the book upon import, automatically changing any
> reference in those worksheets to use the new ids.

No, it is way worse.    For starters, think very carefully about how
these *references* are expressed?  (1) with that design the references
are unreadable, (2) the references could be autogenerated as output of
some sage command, hence be *impossible* to change by scanning the
worksheets.  With my design -- which just happens to be the bog
standard design that is used everywhere (web pages, etc.), imho --
even autogenerated references would work fine (since they are
relative).   Plus, sticking with a standard design means it will be
easier for people to understand.

 -- William

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to