-
Notifications
You must be signed in to change notification settings - Fork 88
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
How to make <defaultVal> deletable? #1807
Comments
In such cases I just copy out the original spec and delete/change as necessary. |
@joeytakeda Does this solve your problem? If so, could you close the ticket? (For the record, I think anything more complicated such as allowing Also, to make the attribute required, just add |
And to be fair, if an attribute sepcification is required by the schema, then it does not matter a hoot what the schema thinks will be the default value is. That said, and add to it that @martindholmes is correct above (just need |
This works perfectly for me: <elementSpec ident="egXML" ns="http://www.tei-c.org/ns/Examples" mode="change" module="tagdocs">
<attList>
<attDef ident="valid" mode="replace" usage="req">
<desc versionDate="2011-01-30" xml:lang="en">indicates the intended validity of the example with respect to
a schema.</desc>
<datatype><dataRef key="teidata.enumerated"/></datatype> <valList type="closed">
<valItem ident="true">
<desc versionDate="2011-12-04" xml:lang="en">the example is intended to be fully valid,
assuming that its root element, or a provided root element,
could have been used as a possible root element in the schema concerned.</desc>
</valItem>
<valItem ident="feasible">
<desc versionDate="2011-12-04" xml:lang="en">the example could be transformed into
a valid document by inserting any number of valid attributes and child
elements anywhere within it; or it is valid against a version of the
schema concerned in which the provision of character data, list, element, or attribute
values has been made optional.</desc>
</valItem>
<valItem ident="false">
<desc versionDate="2011-01-30" xml:lang="en">the example is not intended to be valid,
and contains deliberate errors.</desc>
</valItem>
</valList>
</attDef>
</attList>
</elementSpec> |
And this fails to make <elementSpec ident="egXML" module="tagdocs" mode="change">
<attList>
<attDef ident="style" mode="delete"/>
<attDef ident="rendition" mode="delete"/>
<attDef ident="corresp" mode="delete"/>
<attDef ident="resp" mode="delete"/>
<attDef ident="cert" mode="delete"/>
<attDef ident="source" mode="delete"/>
<attDef ident="facs" mode="delete"/>
<!--Need to know validity of the EGXML-->
<attDef ident="valid" mode="change" usage="req" />
</attList>
</elementSpec> using the CLI roma that y’all want to stop supporting. Error found: I did not have |
What @sydb is doing was exactly what I did originally, and then realized that no one was actually explicitly encoding I'm happy to do what @martindholmes suggests above (as I noted at the end of the OP :-)), but I just don't love it, since that means that the local definition of |
@joeytakeda you're perfectly correct that this is not ideal. The problem really is twofold. First, it's not clear whether |
If I understand you correctly, @joeytakeda , then no, it’s not that the usage requirement is met by the default value, but rather that the default value is rendered useless by the usage requirement. But back to your original point, I cannot come up with a reason (off the top of my head) why |
|
We haven't specified clearly enough what we intend by Part of me thinks this doesn't matter because THERE SHOULDN'T BE DEFAULT VALUES ANYWAY. Why don't we just get rid of them and this specific problem goes away. |
I absolutely agree with Martin’s second point: defaultVals are annoying and cause problems such as this (I was actually just thinking about all the defaultVals I’d delete if defaultVal was made a member of att.combinable). And I understand where @lb42 is coming from, but, as I said in the OP, I know that just rewriting the specification is easier because it works, but is a lot of work for something that I think should be quite simple. To me, I see no reason why if you can elegantly add attribute values, delete them, change them, add restrictions to the data type, etc etc in a number of ways in ODD, why can’t you just get rid of the silly default value? |
I agree with @joeytakeda (and @martindholmes, I think), that having As I’ve said elsewhere (and is not really the topic of this ticket), I would prefer not to get rid of And, no matter how you look at it, @joeytakeda , it makes no sense to have both <rule context="tei:attDef[@usage eq 'req']">
<report test="tei:defaultVal">It does not make sense to make "<value-of select="normalize-space(tei:defaultVal)"/>" the default value of @<value-of select="@ident"/>, because that attribute is required.</report>
</rule> |
Yes, that make completes sense. So, I suppose to make the formal request:
If 1 is approved, I can make a ticket for 2. |
I'm not saying |
(Ummm... we should probably move this discussion to the appropriate ticket, no?)
And (at least at the moment) I respectfully disagree. I think But I’m not sure I understand what you mean by "facing the Stylesheets issue for something we don’t want anyway”. We need to allow users to delete |
If we don't use it in the Specs, then nobody should need to delete it. If they don't want it, they don't add it to their ODDs. The number of people who will add it to an ODD, then override that and delete it in a derived ODD will be vanishingly small. |
But ODD is a system for writing and customizing schema languages, not just TEI. If MEI uses Yes, vanishingly small, but for consistency’s sake, I still think it should be there. So I would probably agree to low priority, but not to saying it should not be done. |
Fair enough. Let's start digging through the Stylesheets, then! |
Can I close this ticket and open a new one in the stylesheet repo? |
Might be a little premature; may want a few others from Council to weigh in, no? |
(PS: I am happy to help with work on the stylesheets/submit a PR if that
helps with anything.)
…On Mon, Sep 10, 2018 at 5:16 PM Syd Bauman ***@***.***> wrote:
Let's start digging through the Stylesheets, then!
Might be a little premature; may want a few others from Council to weigh
in, no?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1807 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AQ2K-0oIObivtmtZkl9pQi8yokclhVUwks5uZwD3gaJpZM4WSNr7>
.
|
Thinking about this again, I remain unconvinced. Changing the default value for an attribute from one value to another is a plausible change, which is supported by the current ODD language. But removing the existence of any default value at all seems to me to be a change of a different order, which should properly be done by redefining the attribute. Making the Need I say that I am opposed to removing |
My main concern is that the Guidelines stop using it. The fact that it's used in DTD-land is part of my problem; ever since DTDs and their defaultVals we've had this problem of people "using" attributes without knowing about it. It's mad. It mixes schemas with document instances in a way which is pernicious. Schemas should validate, not contribute to, documents, especially in a world where multiple schemas are routinely used to validate a single document. |
To the detriment of all, some would say. (Not me — although I think the drawbacks of default values outweigh the advantages, I do see the advantages.) If you’re argument, @lb42, is “the |
I think @sydb's point still stands: ODD is a schema writing system, so unless the TEI decides to deprecate and stop supporting
I'm a bit confused about this. What criteria are in place that determines whether or not something is allowed to be combinable or requires redefinition? |
I entirely agree that there should be a way of removing defaultValk if you dont want it. I think that if you do thatr, though, you are changing something pretty fundamental about the attribute, so it's not unreasonable to require you to redefine it. But I can see I am in a minority in this opinion so I'll pipe down. |
Two questions for Council to answer:
If Council agrees with me on #1, then after deleting all our own |
And, while we’re considering questions about
If we make change (0) we do not have to worry about @martindholmes ’s (1). P.S. If we do not make change (0), then I am mildly in favour of both (1) and (2). (I think we should try to avoid using |
I have not changed my opinion on this and simply reiterating points previously raised does not encourage me to do so. But for the record: (1) by all means remove existing usages of defaultVal in the schema if they are so annoying. (2) do not change its existing class membership. And (3) do not monkey with its existing semantics. |
In face to face 2019-05-07 Council decides to have defaultVal claim membership of att.combinable. Discussions of what we should do about defaultVal generally, and changing its semantics are interesting but the Council has made no decision on those. |
Added |
….combinable, removing it from att.deprecated because it gets @validUntil through att.combinable now.
And removed it from att.deprecated in commit 80c7519 because att.combinable is a member of att.deprecated anyway. |
This is implemented, but I've also raised the required issue in the Stylesheets to make sure we get it processed correctly: |
….combinable, removing it from att.deprecated because it gets @validUntil through att.combinable now.
I'm trying to do two things here: 1) Make an attribute required and 2) delete the default value for that attribute from an
<elementSpec>
. Is there any way to do this? I'm doing this for<egXML>
:If I give a value of
<defaultVal/>
like so, it appropriately thinks that I am trying to give it an emptydefaultVal
, which I don't want to do (and it gets mad at me, since it makes no sense to require an attribute and not give it a value).<defaultVal>
isn't a member ofatt.combinable
, so I can't do this:So other than copying the spec for
@valid
and leaving out the<defaultVal>
element, is there a way to delete the<defaultVal>
? If there isn't, could<defaultVal>
be added toatt.combinable
so that one could delete it?The text was updated successfully, but these errors were encountered: