OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-publishers message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [DocBook-publishers] Schema questions



On 18 Mar 2010, at 13:57, Norman Walsh wrote:

> Hi folks,
> 
> I've made (I hope) quite a bit of progress towards a functioning RNG
> to DTD converter for the DocBook family of schemas. It seems to work for
> the base schema and at least mostly works for publishers.
> 
> The trouble I have now is that I've reached a point in the publishers
> schema where I don't understand the intent.

Good morning Norm

That's exactly the point that I've reached. I've been trying to make the time
to investigate. As you've raised it, I went out and had a look at 
dccterms.xsd.

> 
> There are a bunch of patterns in dcterms.rnc that look like this:
> 
>  Period = SimpleLiteral, xsd:string

It doesn't look like that would have been the attempt. In the XSD 
SimpleLiteral is inherited from the base dc.xsd model and SimpleLiteral
is defined as allowing text only (in a slightly peculiar way that I think is
intended to allow a lot of redefinition). SimpleLiteral allows an optional
xml:lang attribute.

SimpleLiteral is redefined in those patterns to disallow xml:lang. Nothing
else changes.

So, I think that all of those patterns should (effectively) be just strings.

> 
> That appears to be a SimpleLiteral followed by a string. Is that what
> was intended? Or was it supposed to be a choice between a simple
> literal and a string? Or was it supposed to be a SimpleLiteral of type
> string? (It appears that some of this is transliterated from an XSD.)
> 
> It also bothers me that these patterns are defined but never used. Are
> they only for extensibility?

The patterns appear to be the Dublin Core syntax encoding and
vocabulary encoding types. I'm not an expert in this (far from it)
but these are usually used (in XML implementations of DC) as 
values for an xsi:type attribute.  This example is in http://dublincore.org/documents/dc-xml-guidelines/

<dc:subject xsi:type="dcterms:DDC">
    062
  </dc:subject>
  <dc:subject xsi:type="dcterms:UDC">
    061(410)
  </dc:subject>

So, I think they are there simply as definitions of values which 
may be used in attributes.  I'm pretty certain that they could all 
be defined in terms of a simple string pattern.

> 
> Finally, we have:
> 
>  DCMIType |= SimpleLiteral, DCMIType


This should be a restriction of dcmitype:DCMIType which is
 an enumeration. The only effect of the restriction is to 
disallow the xml:lang attribute.

> 
> Which is truly confusing since DCMIType is defined as a list of
> literal strings. A list that is also unused.
> 
> Anyone got a clue by four?

It looks like a slightly confused machine translation of dcterms.xsd to me. I wasn't
involved in DocBook Publishers at the time  this was created but I'd guess 
more manual approach is required to get something that retains compatibility
with original whist making more sense in RNG terms. 

If no one else has the time to do this, I can take a look at it but not until 
Thursday next week.

cheers

nic

> 
>                                        Be seeing you,
>                                          norm
> 
> -- 
> Norman Walsh <ndw@nwalsh.com> | Virtuous people often revenge
> http://nwalsh.com/            | themselves for the constraints to which
>                              | they submit by the boredom which they
>                              | inspire.--Gustave Le Bon
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev_______________________________________________
> DocBook-publishers mailing list
> DocBook-publishers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/docbook-publishers

--
Nic Gibson
Director, Corbas Consulting Ltd
Editorial and Technical Consultancy and Training
http://www.corbas.co.uk, +44 (0)7718 906817	






[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]