Re: @xml:base with @rendition (and maybe other pointers)
Martin Holmes <[email protected]> Sat, 6 May 2017 21:44:30 -0700
| Newsgroups | gmane.text.tei.general |
|---|---|
| Message-ID | <[email protected]> |
Hi John, On 2017-05-06 09:51 AM, John P. McCaskey wrote: > I myself would not recommend prefixes for the modest projects I see. > Learning XML and TEI is enough without learning regular expressions. That's true, but you only need temporary access to a single individual=20 with regex skills to set up one or two prefix defs for you, and you're=20 good to go; you don't need to learn it all yourself. > And there is the need to keep straight the difference between these TEI > prefixes and common URL prefixes. History student: =E2=80=9COh, you mea= n like > http:?=E2=80=9D Yes, it=E2=80=99s like your own custom http:. =E2=80=9C= Do I need the //?=E2=80=9C Well, > no, it=E2=80=99s like a URL prefix, but different. More a URI prefix th= an a URL > prefix. Umm, forget that. Just don=E2=80=99t use one that=E2=80=99s alr= eady taken. Not > that it really matters. But, well, sometimes it could. =E2=80=9DKinda l= ike > namespaces, which I=E2=80=99ve finally figured out in XML?=E2=80=9D Yes= ! =E2=80=9DGot it. Where > do I put the xmlns part?=E2=80=9D Well, no, <prefixDef> is used instead= . =E2=80=9CSigh. > To point to my renditions, why can=E2=80=99t I just use #red=E2=80=9D? = You could . . . > but pull up a chair and I=E2=80=99ll explain more why we recommend othe= rwise. I don't think anyone has recommended otherwise, actually. I'd recommend a) avoid @xml:base like the plague (as Hugh suggested) b) if you can, put your <rendition>s in the same file as the @renditions=20 that point to them, and use #red, and c) if you need more complexity, ask someone to help you set up a=20 <prefixDef>. > Sigh. > > I consider prefixes an advanced topic. > > (By the way, is it still a URI once a TEI prefix is added? Or is it a > URI only after the prefix is processed?) No, it's a URI in its prefixed form. > Whatever gets written, the reader should be able to walk away with > practical starting-point advice: > - =E2=80=9DWhat should I use for internal pointers?=E2=80=9D A # follow= ed by any name > you choose. Then use the same name without the # as xml:id on the other= end. > - =E2=80=9CHow should I encode file names?=E2=80=9C Just the file name.= Then enter the > directory as xml:base in <text>. Yes to the first, no to the second, for me. > I would not have the first thing in the how-to be: =E2=80=9CThere are f= our kinds > of pointers. The first is a prefixed pointer. . . .=E2=80=9D One way to think of <prefixDef> is as a kind of old-fashioned @key=20 attribute, except that it comes with explicit documentation in=20 processable format that tells you how to dereference it. Cheers, Martin > John