[tei-council] Prefixing ids with "tei_"

Martin Holmes mholmes at uvic.ca
Fri Jan 18 14:26:15 EST 2013


Hi all,

I've been working on this long-standing ticket 
(<http://purl.org/TEI/BUGS/3472477>) to add a "tei_" prefix to all ids 
and pointers in the Guidelines build, to avoid having adblock tools hide 
divs because of accidental collisions of id with known ad ids.

This proves to be way more difficult than you'd think, but I have 
managed something:

<http://web.uvic.ca/lancenrd/martin/guidelines/index.html>

(No images are there, just the text pages.)

I'm doing this by pre-processing the p5.xml file to add the prefix 
throughout, before passing the result to the guidelines processing xsl. 
There are some changes to the guidelines.xsl.model to make it work, but 
no changes to other stylesheets.

The wrinkle is that I can't find a way to do just the in-page ids; I 
have to do the page filenames as well, because @xml:ids are intimately 
tied up with chapter page names. So where before we had SD.html, we now 
have tei_SD.html. This will be annoying to people who have bookmarked 
pages in the guidelines, but it could be mitigated by redirects.

If this change is unacceptable, then I think I'll have to give up on 
this approach, and go for post-processing the Guidelines pages after 
they're generated. I think that will add more time to the build than the 
pre-processing approach.

Let me know what you think. It may be that this whole idea is not worth 
the trouble.

Cheers,
Martin
-- 
Martin Holmes
University of Victoria Humanities Computing and Media Centre
(mholmes at uvic.ca)


More information about the tei-council mailing list