# updating the schema?

**URL:** https://discourse.citationstyles.org/t/updating-the-schema/292
**Category:** CSL Development
**Created:** [July 9, 2007, 7:07pm UTC](https://discourse.citationstyles.org/t/updating-the-schema/292 "2007-07-09T19:07:57Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)
#### Post date: [July 9, 2007, 7:07pm UTC](https://discourse.citationstyles.org/t/updating-the-schema/292/1 "2007-07-09T19:07:57Z")

</div>

Simon,

How do you want to proceed on the schema?

Perhaps the cleanest approach is to work with the branch schema and copy  
over attributes and other structures from the trunk as you need them? I  
started to do this with, for example, the parameters for names and such.

As I mentioned, using oXygen would be ideal, as you can have the schema  
open in one window (complete with validation and indentation support)  
and a test style that gets validated against it in another.

Some other thoughts:

I moved to the cs:context element because I thought we needed contexts  
other than citation and bibliography.

If in fact we’re doing that with other methods, then we probably ought  
to switch back to cs:citation and cs:bibliography, just so that we are  
ensured it will be possible to validate stuff.

This brings up the question of whether to maintain the tight class-based  
validation constraints of the trunk schema? That is there in part for  
documentation reasons, but also to alert people to when they’re doing  
something obviously wrong.

Bruce

---

<div class="post-metadata">

### Author: ![Simon\_Kornblith](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Simon\_Kornblith](https://discourse.citationstyles.org/u/Simon_Kornblith)
#### Post date: [July 9, 2007, 7:22pm UTC](https://discourse.citationstyles.org/t/updating-the-schema/292/2 "2007-07-09T19:22:23Z")

</div>

> Simon,
> 
> How do you want to proceed on the schema?
> 
> Perhaps the cleanest approach is to work with the branch schema and  
> copy  
> over attributes and other structures from the trunk as you need  
> them? I  
> started to do this with, for example, the parameters for names and  
> such.

This makes sense to me.

> As I mentioned, using oXygen would be ideal, as you can have the  
> schema  
> open in one window (complete with validation and indentation support)  
> and a test style that gets validated against it in another.
> 
> Some other thoughts:
> 
> I moved to the cs:context element because I thought we needed contexts  
> other than citation and bibliography.
> 
> If in fact we’re doing that with other methods, then we probably ought  
> to switch back to cs:citation and cs:bibliography, just so that we are  
> ensured it will be possible to validate stuff.

Either way. The allowed child elements should be the same for both,  
so I’m not sure where the validation issue comes in.

> This brings up the question of whether to maintain the tight class-  
> based  
> validation constraints of the trunk schema? That is there in part for  
> documentation reasons, but also to alert people to when they’re doing  
> something obviously wrong.

I would say no. Some of the current Zotero styles don’t validate  
because of these constraints, I think, but there’s nothing obviously  
wrong with them. Versatility is preferable to strict validation. It  
might make sense to have a tool that ensures there’s nothing  
obviously wrong with them, but I don’t think this logic has to be  
embedded in the schema.

Do we actually need style classes? From the parser’s point of view,  
it seems like the only difference is between note citations and in-  
text citations.

Simon

---

<div class="post-metadata">

### Author: ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)
#### Post date: [July 9, 2007, 7:41pm UTC](https://discourse.citationstyles.org/t/updating-the-schema/292/3 "2007-07-09T19:41:11Z")

</div>

> > If in fact we’re doing that with other methods, then we probably ought  
> > to switch back to cs:citation and cs:bibliography, just so that we are  
> > ensured it will be possible to validate stuff.
> 
> Either way. The allowed child elements should be the same for both,  
> so I’m not sure where the validation issue comes in.

In general, it’s harder to validate patterns based on attributes than  
elements. In XSD you can’t do it at all. In RNG, you can, but there are  
some cases where you can’t. For example, IIRC, the interleave pattern  
(unordered constraints) cannot be based on an attribute.

E.g. it’s a question of technical limitations more than anything. Am  
not sure it’d be a problem; just observing it can be.

> > This brings up the question of whether to maintain the tight class-  
> > based  
> > validation constraints of the trunk schema? That is there in part for  
> > documentation reasons, but also to alert people to when they’re doing  
> > something obviously wrong.
> 
> I would say no. Some of the current Zotero styles don’t validate  
> because of these constraints, I think, but there’s nothing obviously  
> wrong with them. Versatility is preferable to strict validation. It  
> might make sense to have a tool that ensures there’s nothing  
> obviously wrong with them, but I don’t think this logic has to be  
> embedded in the schema.

Yes, but there’s a lot of gray area in between. If the schema is too  
tight now, does that mean it should be wide-open?

> Do we actually need style classes? From the parser’s point of view,  
> it seems like the only difference is between note citations and in-  
> text citations.

Well, we could tweak the schema to make sure everything is explicit.  
For example, right now disambiguation of author-date styles (Doe,  
1999a, 1999b) is implicit; understood to be a characteristic of the  
class. The same with the “author” class.

Class-based validation also allows you to control:

```
- allowed sort options
- whether a citation and bibliography element are both required
- what should be in a citation

```

Bruce

---

<div class="post-metadata">

### Author: ![Simon\_Kornblith](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Simon\_Kornblith](https://discourse.citationstyles.org/u/Simon_Kornblith)
#### Post date: [July 9, 2007, 8:05pm UTC](https://discourse.citationstyles.org/t/updating-the-schema/292/4 "2007-07-09T20:05:15Z")

</div>

> > > If in fact we’re doing that with other methods, then we probably  
> > > ought  
> > > to switch back to cs:citation and cs:bibliography, just so that  
> > > we are  
> > > ensured it will be possible to validate stuff.
> > 
> > Either way. The allowed child elements should be the same for both,  
> > so I’m not sure where the validation issue comes in.
> 
> In general, it’s harder to validate patterns based on attributes than  
> elements. In XSD you can’t do it at all. In RNG, you can, but there  
> are  
> some cases where you can’t. For example, IIRC, the interleave pattern  
> (unordered constraints) cannot be based on an attribute.
> 
> E.g. it’s a question of technical limitations more than anything. Am  
> not sure it’d be a problem; just observing it can be.

But unless we want stricter validation as below, there’s not much  
need to validate patterns based on attributes. The only difference  
between the bibliography and citation contexts would be allowed options.

> > > This brings up the question of whether to maintain the tight class-  
> > > based  
> > > validation constraints of the trunk schema? That is there in part  
> > > for  
> > > documentation reasons, but also to alert people to when they’re  
> > > doing  
> > > something obviously wrong.
> > 
> > I would say no. Some of the current Zotero styles don’t validate  
> > because of these constraints, I think, but there’s nothing obviously  
> > wrong with them. Versatility is preferable to strict validation. It  
> > might make sense to have a tool that ensures there’s nothing  
> > obviously wrong with them, but I don’t think this logic has to be  
> > embedded in the schema.
> 
> Yes, but there’s a lot of gray area in between. If the schema is too  
> tight now, does that mean it should be wide-open?
> 
> > Do we actually need style classes? From the parser’s point of view,  
> > it seems like the only difference is between note citations and in-  
> > text citations.
> 
> Well, we could tweak the schema to make sure everything is explicit.  
> For example, right now disambiguation of author-date styles (Doe,  
> 1999a, 1999b) is implicit; understood to be a characteristic of the  
> class. The same with the “author” class.
> 
> Class-based validation also allows you to control:
> 
> - allowed sort options
> - whether a citation and bibliography element are both required
> - what should be in a citation

Validation should serve to ensure that any CSL style is interpreted  
in the same way by any CSL parser. I believe that, when possible,  
things like disambiguation should be explicit in the style. (EndNote  
provides four options for controlling disambiguation. While this  
might be overkill, it wouldn’t hurt.) I certainly don’t think we want  
to get into specifying what is allowed in a citation. A parser should  
be able to handle any permutation of elements, and that’s all that  
matters.

Simon

---

<div class="post-metadata">

### Author: ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)
#### Post date: [July 9, 2007, 8:27pm UTC](https://discourse.citationstyles.org/t/updating-the-schema/292/5 "2007-07-09T20:27:37Z")

</div>

Simon Kornblith wrote:

> Validation should serve to ensure that any CSL style is interpreted  
> in the same way by any CSL parser.

Fine. In any case, it’d be better than people just guessing whether it’s  
valid. Zotero, for example, should not accept invalid files.

> I believe that, when possible,  
> things like disambiguation should be explicit in the style. (EndNote  
> provides four options for controlling disambiguation. While this  
> might be overkill, it wouldn’t hurt.)

So what should the options be here?

```
year-suffix
title

```

…?

Bruce

---

<div class="post-metadata">

### Author: ![Simon\_Kornblith](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Simon\_Kornblith](https://discourse.citationstyles.org/u/Simon_Kornblith)
#### Post date: [July 9, 2007, 8:33pm UTC](https://discourse.citationstyles.org/t/updating-the-schema/292/6 "2007-07-09T20:33:30Z")

</div>

EndNote provides the following:

"Include the author initials or full name in citation"  
Name Format: {“Full Names” | “A.B.” | “AB” (etc)}

“Add more authors until the citation is unique”

"Add the title for different works by the same author"  
Title Format: {“Full Title” | “Short Title”}

"Add a letter after the year"  
Letter Format: {“2000a, b” | “2000a, 2000b”}

Simon

---

<div class="post-metadata">

### Author: ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)
#### Post date: [July 9, 2007, 9:00pm UTC](https://discourse.citationstyles.org/t/updating-the-schema/292/7 "2007-07-09T21:00:46Z")

</div>

Simon Kornblith wrote:

> EndNote provides the following:
> 
> “Include the author initials or full name in citation”  
> Name Format: {“Full Names” | “A.B.” | “AB” (etc)}
> 
> “Add more authors until the citation is unique”
> 
> “Add the title for different works by the same author”  
> Title Format: {“Full Title” | “Short Title”}
> 
> “Add a letter after the year”  
> Letter Format: {“2000a, b” | “2000a, 2000b”}

Those aren’t mutually exclusive, are they? I mean, certainly the last  
two are, but not sure about those and the first two.

Bruce

---

<div class="post-metadata">

### Author: ![Simon\_Kornblith](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Simon\_Kornblith](https://discourse.citationstyles.org/u/Simon_Kornblith)
#### Post date: [July 9, 2007, 9:05pm UTC](https://discourse.citationstyles.org/t/updating-the-schema/292/8 "2007-07-09T21:05:46Z")

</div>

No. In EndNote, these are all checkboxes.

Simon

---

<div class="post-metadata">

### Author: ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)
#### Post date: [July 10, 2007, 2:16am UTC](https://discourse.citationstyles.org/t/updating-the-schema/292/9 "2007-07-10T02:16:16Z")

</div>

So a strawman:

disambiguate-citation = element cs:option {  
attribute name { “disambiguate-citation” },  
attribute value { “year-suffix” | “title-full” | “title-short” }  
}

disambiguate-citation-names = element cs:option {  
attribute name { “disambiguate-citation-names” },  
# first option modifies indivual names, and second extends et-al "use-first"  
attribute value { “add-givenname” | “add-names” }  
}

Bruce

---

<div class="post-metadata">

### Author: ![Simon\_Kornblith](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Simon\_Kornblith](https://discourse.citationstyles.org/u/Simon_Kornblith)
#### Post date: [July 10, 2007, 6:03am UTC](https://discourse.citationstyles.org/t/updating-the-schema/292/10 "2007-07-10T06:03:01Z")

</div>

These aren’t mutually exclusive either, are they?

Simon

---

<div class="post-metadata">

### Author: ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)
#### Post date: [July 10, 2007, 5:18pm UTC](https://discourse.citationstyles.org/t/updating-the-schema/292/11 "2007-07-10T17:18:05Z")

</div>

No.

Bruce
