Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn if an attDef with a non-colonized @ident has a @ns attribute #2069

Closed
wants to merge 1 commit into from
Closed

Warn if an attDef with a non-colonized @ident has a @ns attribute #2069

wants to merge 1 commit into from

Conversation

dmj
Copy link
Contributor

@dmj dmj commented Dec 4, 2020

As pointed out in [1] attributes with an unprefixed ("non-colonized") name are in the empty namespace as opposed to unprefixed element names that are in the default namespace. A @‍ns attribute on an attDef with a non-colonized @‍ident thus has no effect. It would bind the default namespace to the value in @‍ns but it would not put the attribute in this namespace.

[1] TEIC/Stylesheets#237 (comment)

@hcayless
Copy link
Member

Summarizing the state of things: we want to do this in tandem with fixing the processing problem, so we're not acting on it immediately. The solution implicitly proposed here is that if a namespace is being set with @ns, then it should have a prefix set on the ident, and this prefix will be bound to the namespace. This isn't the only possible solution, but if we go with it, then we'll implement it in the Stylesheets and merge this PR.

@ebeshero
Copy link
Member

ebeshero commented May 7, 2021

Council SVF2F May 2021: We need to think about this. Questions and issues to follow up on:

  • How should we define an attribute within a specified namespace? We should use the @ns attribute, but should @ident have a prefix, or should it be inherited from the root element of the ODD, or via the {Qname} notation?
  • Is it really actually best to ensure we use a colon?
  • We may need to define a new attribute for declaring the prefix. Or how do we declare the prefix so that we may refer to it, so that there's no name collision with a TEI attribute, for example?
  • How is this related to Stylesheets ticket: ODD processing and custom attributes (of existing names) Stylesheets#237 ?

@HelenaSabel HelenaSabel self-assigned this Aug 20, 2021
@sydb
Copy link
Member

sydb commented Apr 1, 2022

For SVF2F discussion of 2022-04-02: An ODD file to play with. It demonstrates (what we hope is) a solution to the problem w/o any changes to TEI or Stylesheets.

@raffazizzi
Copy link
Contributor

raffazizzi commented Apr 8, 2022

Council decides to reject the PR because relying on namespace prefixes isn't a reliable solution. Prefixes are user defined and may be altered by XML processors at any time, while a prefix in @name wouldn't be altered and may break an ODD.

The solution linked by @sydb above, which relies on <altIdent> to allow @name to refer to the desired @indent, works for the time being to address the issue raised. Council will also open a new ticket to investigate a better solution that may, for example, introduce @ns to elements such as <attDef>.

@raffazizzi raffazizzi closed this Apr 8, 2022
@dmj
Copy link
Contributor Author

dmj commented Apr 15, 2022

Is there an issue that tracks the intended use of altIdent?

@ebeshero
Copy link
Member

Hi @dmj : I think this is probably the ticket you are looking for: #2049

@martinascholger martinascholger added this to the Guidelines 4.4.0 milestone Apr 15, 2022
@sydb
Copy link
Member

sydb commented Apr 15, 2022

@dmj — No, I don’t think there is an issue that tracks the intended use of <altIdent>, just there is no issue to track the intended use of <gloss>. (The one @ebeshero links to is one about removing a particular use case for <altIdent>; it doesn’t really talk about how to use it.)
But it is an interesting question as to whether or not the Guidelines, or perhaps some user documentation about ODD, should discuss or demonstrate how to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants