Re: @xml:base with @rendition (and maybe other pointers)

Piotr Banski <[email protected]> Tue, 2 May 2017 20:44:00 +0200
Newsgroups gmane.text.tei.general
Message-ID <[email protected]>
You can either nullify xml:base locally as needed (when you decide on 
using rendition) or make the URL complete, either via the file system or 
via your web server, but neither of these would qualify as "good 
practice", IMO.

In your specific case, I think defaulting @rendition could help, if you 
are able to default it on the elements in question. It doesn't really 
close the can of worms, because this is not a systemic solution for when 
you have two attributes on a single element in a situation when one of 
them should be resolved via xml:base and the other should not. But it 
might be sufficient for your purposes. I think the defaulting should be 
described in the documentation of @rendition, Syd Bauman has recently 
announced a new approach to it but I forget where :-)

Good luck,

   Piotr

On 05/02/17 17:30, John P. McCaskey wrote:
>
> Is there a way, in xml:base semantics, to explicitly make a pointer 
> relative to the document instead of to the xml:base active at the 
> node? Something like “thisDocument#id”?
>
> If so, then the good practice could be to use this for @rendition and 
> other internal pointers. Then modification of xml:base to, say, 
> relocate images or hyperlinks, would not mess up the internal 
> pointers. And it would allow pointers typically internal to still have 
> external reference when needed.
>
> John
>
> On 5/2/2017 11:19 AM, Martin Holmes wrote:
>> I think the same rules should apply to all pointer types. John is 
>> right to remind us of something I've been guilty of many times over: 
>> writing pointer-handling code that doesn't think to look at 
>> @xml:base. But that's my fault, not the fault of XML or TEI. I think 
>> the semantics of @xml:base and the semantics of pointers are clear 
>> and should be consistently implemented for all attributes and ids. If 
>> there's an @xml:base, all pointers in the document should be resolved 
>> based on it.
>>
>> Cheers,
>> Martin
>>
>> On 2017-05-02 06:46 AM, Piotr Bański wrote:
>>> One thought is to introduce a tei.localref datatype that would be
>>> defined as an XML name prepended with a '#'. That could help in cases
>>> where one would like to create (by means of Schematron[1]) an 
>>> analogy to
>>> the IDREF mechanism. And since the type wouldn't be defined as an URI,
>>> xml:base expansion wouldn't apply to it.
>>>
>>> [1] Maybe the Schematron check should even be an internal part of the
>>> definition of that datatype, to force document() -- except I am not so
>>> sure how "document()" would behave in such cases. I'd love to be
>>> enlightened.
>>>
>>> Musing aloud,
>>>   Piotr
>>>
>>> On 05/02/17 14:46, John P. McCaskey wrote:
>>>> @rendition has datatype teidata.pointer. Pointers can point to 
>>>> locations
>>>> either within the current document or elsewhere. They should be 
>>>> expanded
>>>> with any @xml:base attributes up the XML tree.
>>>>
>>>> But @rendition is supposed to point to an element in the tagsDecl
>>>> element, normally within the same document, though presumably it could
>>>> be the tagsDecl in some other document.
>>>>
>>>> My question: Is it really the case that a rendition pointer should 
>>>> honor
>>>> parent @xml:base attributes?
>>>>
>>>> I guess the theoretical answer is yes, but I can imagine cases 
>>>> where the
>>>> @xml:base attributes are primarily for setting image paths, .xml
>>>> directories, and http addresses, and the coder does not really intend
>>>> the @rendition attributes to point externally.
>>>>
>>>> Thoughts?
>>>>
>>>> John
>>>>
>