OASIS Open Document Format for Office Applications (OpenDocument) TC

Expand all | Collapse all

Re: [office] OpenDocument TC coordination call minutes 2007-08-13

  • 1.  Re: [office] OpenDocument TC coordination call minutes 2007-08-13

    Posted 08-14-2007 15:41
    Hi Kohei,
    
    Yes this is possible in Relax NG (and XSD). You may want to have a look 
    at Murata et al. (2005) for some of the background if you are interested 
    in how the schema languages compare in expressiveness...
    
    Here is a little example on how this can be done specifically in Relax 
    NG. Consider the following document should be rendered invalid:
    
    
    
    So, what we want to express is that "a" may not contain "z" if it occurs 
    as a child "b". A Relax NG grammar to say so can be written as follows 
    (I apologize for the size of the example. I'm no good at Relax NG 
    compact syntax):
    
    
    
    
    References:
    
    Murata, M., Lee, D., Mani, M., and Kawaguchi, K. (2005) 'Taxonomy of XML 
    schema languages using formal language theory'. In: ACM Trans. Inter. 
    Tech. 5, 4 (Nov. 2005), 660-704. DOI= 
    http://doi.acm.org/10.1145/1111627.1111631
    (alternative link: 
    http://www.cobase.cs.ucla.edu/tech-docs/dongwon/mura0619.pdf)
    
    Kohei Yoshida wrote:
    > Hi Lars,
    > 
    > On Tue, 2007-08-14 at 11:57 +0200, Lars Oppermann wrote:
    > 
    >> There are, as you should be aware of, technical possibilities of 
    >> constraining the schema as to disallow certain contents in certain 
    >> elements depending on their context. This was not possible when the 
    >> schema was still specified in a DTD.
    > 
    > (Please bear with me if this is a basic question as I'm certainly not an
    > XML schema expert.)
    > 
    > So, do I read from your above statement that, now that we are using
    > Relax NG as the schema language, it is now possible to constrain or
    > specify different sets of legal child elements of *the same element*
    > depending on the context?  (it would be great if it is.)
    > 
    > If yes, then I think we should work toward making it explicit in the
    > spec in some way.  Because in reality, the exact meaning and behavior of
    > table cells is unfortunately different between word processor and
    > spreadsheet apps, the spec IMHO should reflect this and be explicit
    > about this in text.
    > 
    > Even if it's 'no', then we should still put some note about possibly
    > different interpretation of the legality of the child elements of
    > 


  • 2.  Re: [office] OpenDocument TC coordination call minutes 2007-08-13

    Posted 08-14-2007 15:56
    Lars Oppermann wrote:
    > Hi Kohei,
    > 
    > Yes this is possible in Relax NG (and XSD). You may want to have a look 
    > at Murata et al. (2005) for some of the background if you are interested 
    > in how the schema languages compare in expressiveness...
    > 
    > Here is a little example on how this can be done specifically in Relax 
    > NG. Consider the following document should be rendered invalid:
    
    Just a hint: MUCH easier to read and write RNG using the compact syntax.
    
    Here's an example of validation of child elements conditioned on an 
    attribute.
    
    start = element doc { foo | bar }
    
    foo = attribute type { "foo" }, element x { text }+
    bar = attribute type { "bar" }, element y { text }+
    
    This would be valid:
    
    
    
    .. this would not be valid:
    
    
    
    Note: you can't do this with XML Schema, and there are some limitations 
    even within RNG (you cannot condition validation on an attribute and 
    have interleave patterns within that pattern).
    
    Bruce
    


  • 3.  compact syntax (was: Re: [office] OpenDocument TC coordination callminutes 2007-08-13=

    Posted 08-15-2007 09:45
    Hi Bruce,
    
    Apropos compact syntax... Although I am currently not really fluent at 
    it - because we use the xml syntax in our spec - It may actually be 
    worth considering migrating the spec to use the compact syntax, as it is 
    indeed much more palatable. I don't think that this would impact our 
    nice automatic extraction process, which allows us to have a common 
    document for the schema and the specification text. After all, 
    converting between the two representations is an isomorphism.
    
    What do others think about this?
    
    Bests,
    Lars
    
    Bruce D'Arcus wrote:
    > Just a hint: MUCH easier to read and write RNG using the compact syntax.
    > 
    > Here's an example of validation of child elements conditioned on an 
    > attribute.
    > 
    > start = element doc { foo | bar }
    > 
    > foo = attribute type { "foo" }, element x { text }+
    > bar = attribute type { "bar" }, element y { text }+
    


  • 4.  Exchanging RelaxNG XML of the ODF spec to the compact syntax

    Posted 08-15-2007 12:15
    Hi,
    
    although I had not finished a prototype for the automation to exchange 
    the RelaxNG XML of our ODF specification to compact syntax, I would like 
    to offer some details, as Lars already started the discussion.
    
    I guess it was Rob a year ago, who came up with the suggestion to 
    exchange the RelaxNG XML within the spec by RelaxNG using the compact 
    notation.
    The advantage would be that the schema is easier to read - as Bruce 
    noted - and we would save a lot of space, decreasing the page number of 
    the specification.
    
    As neither Rob and I had the time to work on it, we dropped the topic. 
    Lately I realized that the exchange can be easily done using XSLT and Trang.
    
    Shall we give it a try? What do you think?
    
    Svante
    
    
    Lars Oppermann wrote:
    > Hi Bruce,
    >
    > Apropos compact syntax... Although I am currently not really fluent at 
    > it - because we use the xml syntax in our spec - It may actually be 
    > worth considering migrating the spec to use the compact syntax, as it 
    > is indeed much more palatable. I don't think that this would impact 
    > our nice automatic extraction process, which allows us to have a 
    > common document for the schema and the specification text. After all, 
    > converting between the two representations is an isomorphism.
    >
    > What do others think about this?
    >
    > Bests,
    > Lars
    >
    > Bruce D'Arcus wrote:
    >> Just a hint: MUCH easier to read and write RNG using the compact syntax.
    >>
    >> Here's an example of validation of child elements conditioned on an 
    >> attribute.
    >>
    >> start = element doc { foo | bar }
    >>
    >> foo = attribute type { "foo" }, element x { text }+
    >> bar = attribute type { "bar" }, element y { text }+
    
    


  • 5.  Re: [office] Exchanging RelaxNG XML of the ODF spec to the compactsyntax

    Posted 08-15-2007 13:20
    Svante Schubert wrote:
    
    > As neither Rob and I had the time to work on it, we dropped the topic. 
    > Lately I realized that the exchange can be easily done using XSLT and 
    > Trang.
    > 
    > Shall we give it a try? What do you think?
    
    Yeah, I think technically, it's trivial to do. You just extract the 
    fragments into a single file, run that through Trang, and you're done.
    
    I personally like the idea.
    
    Bruce
    


  • 6.  Re: [office] Exchanging RelaxNG XML of the ODF spec to the compactsyntax

    Posted 08-15-2007 13:51
    Bruce D'Arcus wrote:
    > Svante Schubert wrote:
    >
    >> As neither Rob and I had the time to work on it, we dropped the 
    >> topic. Lately I realized that the exchange can be easily done using 
    >> XSLT and Trang.
    >>
    >> Shall we give it a try? What do you think?
    >
    > Yeah, I think technically, it's trivial to do. You just extract the 
    > fragments into a single file, run that through Trang, and you're done.
    Of course the new single relaxNG file have to be merged back in the 
    similar snippet sizes, but you get the point it's quickly done.
    I will start a test to see how many pages can be spared.
    
    Svante
    
    


  • 7.  Re: [office] Exchanging RelaxNG XML of the ODF spec to the compact syntax

    Posted 08-15-2007 14:51

    This sounds like a good idea, since the RELAX NG compact syntax is easier to read and is so much more...well...compact.

    Question is do we beleive that the Trang conversion is perfect and will not introduce any errors?  I assume it is not perfect (what software is?) so we would probably need to carefully review the translation and verify that no errors were introduced.

    -Rob

    "Bruce D'Arcus" <bdarcus@gmail.com> wrote on 08/15/2007 09:19:51 AM:

    > Svante Schubert wrote:
    >
    > > As neither Rob and I had the time to work on it, we dropped the topic.
    > > Lately I realized that the exchange can be easily done using XSLT and
    > > Trang.
    > >
    > > Shall we give it a try? What do you think?
    >
    > Yeah, I think technically, it's trivial to do. You just extract the
    > fragments into a single file, run that through Trang, and you're done.
    >
    > I personally like the idea.
    >
    > Bruce


  • 8.  Re: [office] Exchanging RelaxNG XML of the ODF spec to the compact syntax

    Posted 08-15-2007 16:49
    On 15/08/07, robert_weir@us.ibm.com 


  • 9.  Re: [office] Exchanging RelaxNG XML of the ODF spec to the compactsyntax

    Posted 08-15-2007 16:55
    Dave Pawson wrote:
    > On 15/08/07, robert_weir@us.ibm.com 


  • 10.  Re: [office] Exchanging RelaxNG XML of the ODF spec to the compactsyntax

    Posted 08-15-2007 17:07
    Bruce,
    
    Actually I asked Svante about this and he suggested:
    
    Relax -> compact Relax, followed by:
    
    compact Relax -> Relax^1, followed by:
    
    diff on Relax and Relax^1.
    
    I would add some spot checking on some of the more complex 
    constructions, say about 5% of the total. Just as a sanity check.
    
    Hope you are having a great day!
    
    Patrick
    
    Bruce D'Arcus wrote:
    > Dave Pawson wrote:
    >> On 15/08/07, robert_weir@us.ibm.com 


  • 11.  Re: [office] Exchanging RelaxNG XML of the ODF spec to the compactsyntax

    Posted 08-16-2007 08:18
    Hi Patrick,
    
    well, I think what we can do in addition to your suggestion is to 
    provide a compact schema with new drafts that we upload. This would 
    allow us to get some experience with them before we actually replace 
    anything in the schema itself, which would be a step that actually is 
    difficult to revert is something goes wrong.
    
    Michael
    
    
    
    Patrick Durusau wrote:
    > Bruce,
    > 
    > Actually I asked Svante about this and he suggested:
    > 
    > Relax -> compact Relax, followed by:
    > 
    > compact Relax -> Relax^1, followed by:
    > 
    > diff on Relax and Relax^1.
    > 
    > I would add some spot checking on some of the more complex 
    > constructions, say about 5% of the total. Just as a sanity check.
    > 
    > Hope you are having a great day!
    > 
    > Patrick
    > 
    > Bruce D'Arcus wrote:
    >> Dave Pawson wrote:
    >>> On 15/08/07, robert_weir@us.ibm.com 


  • 12.  Re: [office] Exchanging RelaxNG XML of the ODF spec to the compactsyntax

    Posted 08-16-2007 09:26
    Michael,
    
    Michael Brauer
    > Hi Patrick,
    >
    > well, I think what we can do in addition to your suggestion is to 
    > provide a compact schema with new drafts that we upload. This would 
    > allow us to get some experience with them before we actually replace 
    > anything in the schema itself, which would be a step that actually is 
    > difficult to revert is something goes wrong.
    Great idea! Thanks!
    
    I suppose I spent too many years as a sysadmin. I don't mind change, but 
    I do want it tested, repeatedly, before actually switching over.
    
    Hope you are having a great day!
    
    Patrick
    >
    > Michael
    >
    >
    >
    > Patrick Durusau wrote:
    >> Bruce,
    >>
    >> Actually I asked Svante about this and he suggested:
    >>
    >> Relax -> compact Relax, followed by:
    >>
    >> compact Relax -> Relax^1, followed by:
    >>
    >> diff on Relax and Relax^1.
    >>
    >> I would add some spot checking on some of the more complex 
    >> constructions, say about 5% of the total. Just as a sanity check.
    >>
    >> Hope you are having a great day!
    >>
    >> Patrick
    >>
    >> Bruce D'Arcus wrote:
    >>> Dave Pawson wrote:
    >>>> On 15/08/07, robert_weir@us.ibm.com 


  • 13.  Re: [office] Exchanging RelaxNG XML of the ODF spec to the compact syntax

    Posted 08-16-2007 14:01

    In any case we probably should be doing a complete review of the schema for 1.2 anyways, regardless of notation, comparing it to the text of standard.  If we do this agains the compact syntax we can do this all in one pass.

    -Rob
    ___________________________

    Rob Weir
    Software Architect
    Workplace, Portal and Collaboration Software
    IBM Software Group

    email: robert_weir@us.ibm.com
    phone: 1-978-399-7122
    blog: http://www.robweir.com/blog/



    "Dave Pawson" <dave.pawson@gmail.com>

    08/15/2007 12:49 PM

    To
    "robert_weir@us.ibm.com" <robert_weir@us.ibm.com>
    cc
    "OASIS Office" <office@lists.oasis-open.org>
    Subject
    Re: [office] Exchanging RelaxNG XML of the ODF spec to the compact syntax





    On 15/08/07, robert_weir@us.ibm.com <robert_weir@us.ibm.com> wrote:
    > Question is do we beleive that the Trang conversion is perfect and will not
    > introduce any errors?
    The author of Trang believes this is not true.
    I've never heard him go beyond what he is capable of.


    > I assume it is not perfect (what software is?) so we
    > would probably need to carefully review the translation and verify that no
    > errors were introduced.

    Please do. Waste your time perhaps?

    I'm sure James is as good as his word.


    regards

    --
    Dave Pawson
    XSLT XSL-FO FAQ.
    http://www.dpawson.co.uk



  • 14.  Re: compact syntax

    Posted 08-15-2007 13:33
    Lars Oppermann wrote:
    > Hi Bruce,
    > 
    > Apropos compact syntax... Although I am currently not really fluent at 
    > it - because we use the xml syntax in our spec - It may actually be 
    > worth considering migrating the spec to use the compact syntax, as it is 
    > indeed much more palatable. I don't think that this would impact our 
    > nice automatic extraction process, which allows us to have a common 
    > document for the schema and the specification text. After all, 
    > converting between the two representations is an isomorphism.
    > 
    > What do others think about this?
    
    Lars -- this raises a related question. If we favor easy-to-read compact 
    syntaxes for the spec, does that mean we can/should use N3 rather than 
    RDF/XML for the OWL fragments we include in ODF 1.2?
    
    Bruce
    
    


  • 15.  Re: [office] compact syntax

    Posted 08-15-2007 15:02
    Lars,
    
    Lars Oppermann wrote:
    > Hi Bruce,
    >
    > Apropos compact syntax... Although I am currently not really fluent at 
    > it - because we use the xml syntax in our spec - It may actually be 
    > worth considering migrating the spec to use the compact syntax, as it 
    > is indeed much more palatable. I don't think that this would impact 
    > our nice automatic extraction process, which allows us to have a 
    > common document for the schema and the specification text. After all, 
    > converting between the two representations is an isomorphism.
    >
    > What do others think about this?
    >
    Well, I was reluctant when Svante first mentioned it to me but after 
    thinking about the advantages (see below) I am on balance in favor of it.
    
    The advantages that I see are:
    
    1. Compactness: No real surprise but I think we have to realize that as 
    the OpenDocument standard gets longer that readability becomes more and 
    more of an issue. I don't know how many pages we will save but assuming 
    it is 50+, I think it would be worth the effort.
    
    2. General readability: Despite the fact that the OpenDocument standard 
    will be read almost exclusively by standards geeks and implementers (not 
    always the same group), I think anything that we can do to make it 
    easier to read would be worth the effort. I must confess that I read 
    markup (the angle bang stuff) almost as easily as I read clear text but 
    I suspect that is more prevalent among old SGML/XML hands than the 
    current generation working with XML markup.
    
    Hope you are having a great day!
    
    Patrick
    
    -- 
    Patrick Durusau
    patrick@durusau.net
    Chair, V1 - US TAG to JTC 1/SC 34
    Acting Convener, JTC 1/SC 34/WG 3 (Topic Maps)
    Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps)
    Co-Editor, OpenDocument Format (OASIS, ISO/IEC 26300)
    
    


  • 16.  Re: [office] OpenDocument TC coordination call minutes 2007-08-13

    Posted 08-14-2007 15:59
    Lars Oppermann wrote:
    
    > Yes this is possible in Relax NG (and XSD). 
    
    Oh, and are you sure about the last point? XSD is a really dumb language 
      for context-specific validation.
    
    Bruce
    


  • 17.  Re: [office] OpenDocument TC coordination call minutes 2007-08-13

    Posted 08-14-2007 16:45
    Hi Bruce,
    
    The attribute dependent example that you provided is not possible in 
    XSD. The parent element based example that I gave will still work - but 
    I think that is at the very edge of XSD's expressiveness...
    
    Something like this will achieve the desired effect...
    
    
    
    
    
    
    
    [... definition of x,y,z...]
    
    Bruce D'Arcus wrote:
    > Lars Oppermann wrote:
    > 
    >> Yes this is possible in Relax NG (and XSD). 
    > 
    > Oh, and are you sure about the last point? XSD is a really dumb language 
    >  for context-specific validation.
    > 
    > Bruce