SASDigitalHumanitiesTraining / TextEncoding

Text Encoding for Ancient and Modern Literature, Languages and History
9 stars 5 forks source link

Cross referencing links to other websites #15

Closed amywilcockson closed 2 years ago

amywilcockson commented 3 years ago

Hello! I'm just wondering if you could clarify the difference between <ptr> and <ref>. I get that ref links to another location - is this what you use if you're linking to another website too? For example I'm marking up a letter and want to provide a link to the ODNB, but I'm not sure how to link to it. Thanks so much, Amy

gabrielbodard commented 3 years ago

The main difference between <ptr> and <ref> is that the latter contains text, which might for example be marked as a hyperlink, while the former is an empty element, and so may be rendered as a wholly generated link (say an icon) or may just modify the element that contains it in some way. If you want to mark up the equivalent of a HTML hyperlink, then you can in principle use <ref target=""> to do so, yes. Consider though if there is a more semantic way to encode this information: e.g. is this a personal name (<persName ref="">), or placename, or some other kind of label? Is it disambiguating a book title or ISBN or museum inventory number?

amywilcockson commented 3 years ago

Thank you for this - that's really helpful to know. It was a personal name I was going to link to the ODNB, but I've marked it up with a personal name tag now :) thank you for your help!