/ Zope / WHI Hosted Mailing Lists / osis-user / Archive / 2006 / 2006-02 / Re: [osis-user] commentaries in OSIS

[ << ] [ >> ]

[ commentaries in OSIS (was: Re: [sword-devel] ... ] [ Schema problem? / DM Smith ... ]

Re: [osis-user] commentaries in OSIS
DM Smith <dmsmith555(at)yahoo.com>
2006-02-08 16:14:39 [ FULL ]
Chris Little wrote:[...][...][...]
Apologies accepted !!!

[...][...]
This example answers most of my questions. Thanks!

Another question though:
Is there a way to define a default annotateType for a work? Or do I have 
to specify it for every element that has an annotateRef?
(Not that I am going to type it!)

Specifically, there is nothing in the schema language to indicate that 
an attribute is applied to all descendants that don't specify that 
attribute. (xml:lang is used this way) Can annotateType be used the same 
way?

Or can it be like the declaration of a workid, done in the header? (I 
didn't see any support for this in the schema.)[...][...][...][...][...]

Re: [osis-user] commentaries in OSIS
Chris Little <chrislit(at)crosswire.org>
2006-02-08 16:29:39 [ FULL ]
DM Smith wrote:[...][...][...]

Defaulting isn't possible to my knowledge. It makes a certain amount of 
sense, though, and there are other movements afoot to implement 
defaulting in OSIS, so I don't see why it shouldn't be considered.

--Chris

Re: [osis-user] commentaries in OSIS
Patrick Durusau <patrick(at)durusau.net>
2006-02-08 17:29:39 [ FULL ]
Chris,

Actually, yes, with osisCore.2.1.1, soon to be posted on the OSIS 
website (actually in 2.1, the 2.1.1 release is a bug fix) you can 
default works (or other attribute values) with simple XPath expressions.

I just got back the first 50 pages of the Users Manual (it is about 150 
pages in total) with comments but that should be up in complete (and 
hopefully correct) form by the end of the month.

I am in the middle of pushing out an Annex to an ISO draft but I will 
try to post the details, probably tomorrow to this list.

Hope you are having a great day!

Patrick

PS: Ping me tomorrow if you don't see it on the list. I have been 
pulling 11 hours days and sometimes I remember stuff and sometimes I 
don't. ;-)

Chris Little wrote:
[...][...][...]
[...]

Re: [osis-user] commentaries in OSIS
DM Smith <dmsmith555(at)yahoo.com>
2006-02-12 21:08:43 [ FULL ]
Any progress on 2.1.1? Looking forward to seeing the new xsd. (And the 
manual when that comes out!)

Patrick Durusau wrote:[...][...]
>>>
>>>> DM Smith wrote:
>>>
>>> Is there a way to define a default annotateType for a work? Or do
I 
>>> have to specify it for every element that has an annotateRef?
>>> (Not that I am going to type it!)
>>>
>>> Specifically, there is nothing in the schema language to indicate 
>>> that an attribute is applied to all descendants that don't specify

>>> that attribute. (xml:lang is used this way) Can annotateType be
used 
>>> the same way?
>>>
>>> Or can it be like the declaration of a workid, done in the header?

>>> (I didn't see any support for this in the schema.)[...][...]

Re: [osis-user] commentaries in OSIS
Patrick Durusau <patrick(at)durusau.net>
2006-02-15 14:21:15 [ FULL ]
Chris,

You forgot to ping me last week! ;-)

The relevant portion of the Users Manual, (now posted with typos that I 
am working to correct) reads:

In OSIS version 2.1 and later, the *workPrefix* element was added to 
make it possible to specify a default work prefix for the attributes on 
any element in an OSIS document. The *workPrefix* element appears at the 
end of the header, after all the *work* elements. Any number of 
*workPrefix* elements are allowed, each of which sets the default work 
prefix for a particular attribute on a particular element type. For 
example:

      <workPrefix path="//note/(at)annotateRef" osisWork="Bible.KJV"/>

This declaration indicates that the default work prefix on all 
*annotateRef* attributes of *note* elements is to be "Bible.KJV". No 
colon is to be included (the colon is used to separate a work prefix 
from the rest of a reference when the work prefix is explicit rather 
than defaulted).

The syntax of the *path* attribute is taken directly from the W3C XPath 
Recommendation, and can be correctly interpreted by any conforming XPath 
processor. (A *path* attribute is a means to specify a an element in an 
XML document. The leading "//" means that this will find any *note* 
element in the document, wherever it may be found.) However, the form 
shown above is the /only/ form permitted at this time; more complex 
XPaths are not permitted. In other words, the *path* attribute must 
consist of "//", an element type name, "/(at)", and an attribute name. If a 
more detailed defaulting mechanism is required in the future, it will 
likely be provided by permitting a wider range of XPath's features.

The *w* element has attributes which record the morphology and base form 
of a word (the *morph* and *lemma* attributes respectively). Because the 
*w* element is so frequent when used, defaulting the prefix (which 
points to a work defining the morphological of lexical system used) can 
save a lot of data entry effort, which will introduce typing errors.

Hope this helps!

Patrick

Chris Little wrote:
[...][...][...]
[...]

Re: [osis-user] commentaries in OSIS
DM Smith <dmsmith555(at)yahoo.com>
2006-02-15 15:01:15 [ FULL ]
Thanks Patrick,
    You had mentioned in an earlier post in this thread that there would 
be a way to default other attribute values:[...]
I see that it is possible to default work prefixes with the workPrefix 
element. (Which I like a lot!)
How does one default annotateType to commentary?

Also below, I think you want to say "which will minimize typing errors", 
not "which will introduce typing errors". The proper antecedent in the 
sentence is the use of the feature.

Patrick Durusau wrote:[...][...]
>>>
>>>> DM Smith wrote:
>>>
>>> Is there a way to define a default annotateType for a work? Or do
I 
>>> have to specify it for every element that has an annotateRef?
>>> (Not that I am going to type it!)
>>>
>>> Specifically, there is nothing in the schema language to indicate 
>>> that an attribute is applied to all descendants that don't specify

>>> that attribute. (xml:lang is used this way) Can annotateType be
used 
>>> the same way?
>>>
>>> Or can it be like the declaration of a workid, done in the header?

>>> (I didn't see any support for this in the schema.)[...][...]

Re: [osis-user] commentaries in OSIS
Patrick Durusau <patrick(at)durusau.net>
2006-02-15 17:01:14 [ FULL ]
DM,

DM Smith wrote:
[...][...][...]

You want to default an entire attribute value. Yes?

Sorry, have to wait for OSIS 2.5. ;-) Should not be that long, perhaps 
as early as next Fall. A generalized defaulting mechanism for values on 
attributes. Hmmm, interesting and sounds quite useful.

Err, have to think about how that would work when texts other than the 
"main" one are present. In other words, extensive portions of "other" 
texts that are also in markup.

Thanks for the suggestion!
[...]

Hope you are having a great day!

Patrick
[...][...]
>>>
>>>> Chris Little wrote:
>>>>
>>>>> DM Smith wrote:
>>>>
>>>>
>>>> Is there a way to define a default annotateType for a work? Or
do I 
>>>> have to specify it for every element that has an annotateRef?
>>>> (Not that I am going to type it!)
>>>>
>>>> Specifically, there is nothing in the schema language to
indicate 
>>>> that an attribute is applied to all descendants that don't
specify 
>>>> that attribute. (xml:lang is used this way) Can annotateType
be 
>>>> used the same way?
>>>>
>>>> Or can it be like the declaration of a workid, done in the
header? 
>>>> (I didn't see any support for this in the schema.)
>>>
>>>
>>>
>>> Defaulting isn't possible to my knowledge. It makes a certain
amount 
>>> of sense, though, and there are other movements afoot to implement

>>> defaulting in OSIS, so I don't see why it shouldn't be considered.
>>>
>>> --Chris
>>>
>>>
>>>
>>>[...][...][...]

Re: [osis-user] commentaries in OSIS
DM Smith <dmsmith555(at)yahoo.com>
2006-02-15 18:01:17 [ FULL ]
Patrick Durusau wrote:[...][...]
>>> website (actually in 2.1, the 2.1.1 release is a bug fix) you can 
>>> default works (or other attribute values) with simple XPath 
>>> expressions.[...][...]

Sort of.

annotateType is used to indicate the nature of annotateRef. A commentary 
will consist largely of annotateType="commentary". Requiring these for 
each and every annotateRef is tedious, space consuming and error prone. 
What is needed is a way to declare that the nature of the references to 
a particular work form a commentary on that work.

So if on workPrefix we could use annotateType to indicate the nature of 
the prefix, that would work just fine.

If this is acceptable as a solution, then you could include it in the 
manual.
[...][...][...][...]
>>>
>>> You forgot to ping me last week! ;-)
>>>
>>> The relevant portion of the Users Manual, (now posted with typos 
>>> that I am working to correct) reads:
>>>
>>> In OSIS version 2.1 and later, the *workPrefix* element was added
to 
>>> make it possible to specify a default work prefix for the
attributes 
>>> on any element in an OSIS document. The *workPrefix* element
appears 
>>> at the end of the header, after all the *work* elements. Any
number 
>>> of *workPrefix* elements are allowed, each of which sets the
default 
>>> work prefix for a particular attribute on a particular element
type. 
>>> For example:
>>>
>>>      <workPrefix path="//note/(at)annotateRef"
osisWork="Bible.KJV"/>
>>>
>>> This declaration indicates that the default work prefix on all 
>>> *annotateRef* attributes of *note* elements is to be "Bible.KJV".
No 
>>> colon is to be included (the colon is used to separate a work
prefix 
>>> from the rest of a reference when the work prefix is explicit
rather 
>>> than defaulted).
>>>
>>> The syntax of the *path* attribute is taken directly from the W3C 
>>> XPath Recommendation, and can be correctly interpreted by any 
>>> conforming XPath processor. (A *path* attribute is a means to 
>>> specify a an element in an XML document. The leading "//" means
that 
>>> this will find any *note* element in the document, wherever it may

>>> be found.) However, the form shown above is the /only/ form 
>>> permitted at this time; more complex XPaths are not permitted. In 
>>> other words, the *path* attribute must consist of "//", an element

>>> type name, "/(at)", and an attribute name. If a more detailed 
>>> defaulting mechanism is required in the future, it will likely be 
>>> provided by permitting a wider range of XPath's features.
>>>
>>> The *w* element has attributes which record the morphology and
base 
>>> form of a word (the *morph* and *lemma* attributes respectively). 
>>> Because the *w* element is so frequent when used, defaulting the 
>>> prefix (which points to a work defining the morphological of
lexical 
>>> system used) can save a lot of data entry effort, which will 
>>> introduce typing errors.
>>>
>>> Hope this helps!
>>>
>>> Patrick
>>>
>>> Chris Little wrote:
>>>
>>>> DM Smith wrote:
>>>>
>>>>> Chris Little wrote:
>>>>>
>>>>>> DM Smith wrote:
>>>>>
>>>>>
>>>>> Is there a way to define a default annotateType for a
work? Or do 
>>>>> I have to specify it for every element that has an
annotateRef?
>>>>> (Not that I am going to type it!)
>>>>>
>>>>> Specifically, there is nothing in the schema language to
indicate 
>>>>> that an attribute is applied to all descendants that don't
specify 
>>>>> that attribute. (xml:lang is used this way) Can
annotateType be 
>>>>> used the same way?
>>>>>
>>>>> Or can it be like the declaration of a workid, done in the
header? 
>>>>> (I didn't see any support for this in the schema.)
>>>>
>>>>
>>>>
>>>> Defaulting isn't possible to my knowledge. It makes a certain 
>>>> amount of sense, though, and there are other movements afoot
to 
>>>> implement defaulting in OSIS, so I don't see why it shouldn't
be 
>>>> considered.
>>>>
>>>> --Chris

Re: [osis-user] commentaries in OSIS
Patrick Durusau <patrick(at)durusau.net>
2006-02-15 18:51:15 [ FULL ]
DM,

DM Smith wrote:
[...][...]
>>>    You had mentioned in an earlier post in this thread that there 
>>> would be a way to default other attribute values:
>>>
>>>> Actually, yes, with osisCore.2.1.1, soon to be posted on the
OSIS 
>>>> website (actually in 2.1, the 2.1.1 release is a bug fix) you
can 
>>>> default works (or other attribute values) with simple XPath 
>>>> expressions.
>>>
>>>
>>> I see that it is possible to default work prefixes with the 
>>> workPrefix element. (Which I like a lot!)
>>> How does one default annotateType to commentary?
>>>[...][...]

Actually with the current schema, that would be an abuse of the 
workPrefix since it is supposed to be used for work prefixes.

Suggestion: If you have a class of documents where annotateType is 
always going to be commentary, why not insert the values that are not 
commentary and when transforming the document with XSLT, check to see if 
the value is null for annotateType? If no, skip. If yes, insert 
"commentary".

Todd: Can you do an example of this?

Actually for routine values that is a fairly useful thing to have in 
your bag of XSLT tricks anyway.

Hope you are having a great day!

Patrick
[...]

Re: [osis-user] commentaries in OSIS
DM Smith <dmsmith555(at)yahoo.com>
2006-02-15 19:54:23 [ FULL ]
Patrick,

Patrick Durusau wrote:[...][...]
>>>
>>> DM Smith wrote:
>>>
>>>> Thanks Patrick,
>>>>    You had mentioned in an earlier post in this thread that
there 
>>>> would be a way to default other attribute values:
>>>>
>>>>> Actually, yes, with osisCore.2.1.1, soon to be posted on
the OSIS 
>>>>> website (actually in 2.1, the 2.1.1 release is a bug fix)
you can 
>>>>> default works (or other attribute values) with simple
XPath 
>>>>> expressions.
>>>>
>>>>
>>>> I see that it is possible to default work prefixes with the 
>>>> workPrefix element. (Which I like a lot!)
>>>> How does one default annotateType to commentary?
>>>>
>>> Sorry! Misunderstood the question!
>>>
>>> You want to default an entire attribute value. Yes?[...][...]

I thought so, too. I was surprised that the schema allowed such a large 
set of attributes on header elements.
[...]

If I understand correctly, annotateRef is meant to indicate that the 
element contains material refering to what annotateRef points and that 
annotateType indicates the type of the reference.

Is there any required element in the document that will let me know that 
I am working with a commentary or a bible or a dictionary.
I saw the type element with a type="OSIS" but its use is not required 
and its content is not prescribed.

So I guess my question really is what is the normative method for 
marking up a commentary such that xslt can discover that it is a 
commentary and not a dictionary, bible, daily reading or anything else.
[...]

The xslt is not the question, that is easy. And if the attribute were 
necessary on all the elements, I would add them after creating the work, 
using xslt.
[...]

Yes, I am thank you so much!
[...]

MailBoxer