OASIS Open Document Format for Office Applications (OpenDocument) TC

 View Only
Expand all | Collapse all

Namespace 'of' for formula expressions

  • 1.  Namespace 'of' for formula expressions

    Posted 04-10-2008 10:19
    Hi,
    
    It seems this either got lost or didn't reach surface yet. The formula
    subcommittee agreed upon the namespace prefix 'of' to be used in the
    table:formula attribute to distinguish ODF1.2/ODFF/OpenFormula complying
    content from earlier versions and/or other namespace prefixes used by
    applications.
    
    I propose to add the following to Table 1 in section "1.3 Namespaces":
    
    Column 1: of
    
    Column 2: Elements and attributes that describe formula expressions as
              defined in "Part 2: Recalculated Formula (OpenFormula)
              Format".
    
    Column 3: urn:oasis:names:tc:opendocument:xmlns:of:1.2
    
    
    and add the following to the grammar in "1.4 Relax-NG Schema":
    
    xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2"
    
    
    Thanks
      Eike
    
    
    -- 
     OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
    


  • 2.  Re: [office] Namespace 'of' for formula expressions

    Posted 04-10-2008 18:39
    Is the namespace alias required to be "of"?
    
    wt
    
    On Thu, Apr 10, 2008 at 3:18 AM, Eike Rathke 


  • 3.  Re: [office] Namespace 'of' for formula expressions

    Posted 04-11-2008 15:21
    Hi Warren,
    
    On Thursday, 2008-04-10 11:08:17 -0700, Warren Turkal wrote:
    
    > Is the namespace alias required to be "of"?
    
    Pardon? Sorry, I'm not sure I got that question correctly. If you're
    referring whether aliasing the alias to arbitrary different names should
    be allowed: I don't think so. IMHO it should be a fixed value for
    simplicity, so yes, "of" would be the required namespace alias.
    
      Eike
    
    -- 
     OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
    


  • 4.  Re: [office] Namespace 'of' for formula expressions

    Posted 04-11-2008 21:17
    Eike Rathke:
    > Pardon? Sorry, I'm not sure I got that question correctly. If you're
    > referring whether aliasing the alias to arbitrary different names should
    > be allowed: I don't think so. IMHO it should be a fixed value for
    > simplicity, so yes, "of" would be the required namespace alias.
    
    Strictly speaking, from an XML point of view the "of" namespace alias could be any name; "aklfjsajfslkf:" would be fine as long as the matching namespace definition gave the same OpenFormula namespace.
    
    BUT: I think we _should_ limit or strongly encourage, the namespace alias to be "of" exactly, at least when it's inside an OpenDocument document.  The reason is that there are a lot of simple tools/libraries that don't handle namespaces exactly "correctly".  If we always use "of:", then the simple tools will work.... just grab the strings, and yank off the "of:" in front.  We want people to be able to develop simple tools to extract data from a document, and making that prefixed fixed simplifies their lives.
    
    There is the problem of nesting; I suppose we could change it to "should", if someone believes that's important.
    
    --- David A. Wheeler
    


  • 5.  Re: [office] Namespace 'of' for formula expressions

    Posted 04-14-2008 02:15
      |   view attached



  • 6.  Re: [office] Namespace 'of' for formula expressions

    Posted 04-14-2008 11:02
    Hi Ming,
    
    On Monday, 2008-04-14 10:27:04 +0800, Ming Fei Jia wrote:
    
    > I understand that "xmlns:of" to be a lias of "xmlns:office" just for
    > simplicity will not replace the original "xmlns:office". So to consider the
    > backward compatiblity issue, applications should support both
    > "xmlns:office" and "xmlns:of". Is it right?
    
    No, 'xmlns:of' will be a new namespace introduced for recalculated
    formulas that follow the specification drafted by the formula
    subcommittee, e.g. spreadsheet formulas in the table:formula attribute.
    The specification work is informally known as OpenFormula (aka ODFF),
    hence the 'of' name. See
    http://www.oasis-open.org/committees/documents.php?wg_abbrev=office-formula
    
      Eike
    
    -- 
     OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
    


  • 7.  Re: [office] Namespace 'of' for formula expressions

    Posted 04-14-2008 12:41
    On Monday, 2008-04-14 10:27:04 +0800, Ming Fei Jia wrote:
    > > I understand that "xmlns:of" to be a lias of "xmlns:office" just for
    > > simplicity will not replace the original "xmlns:office". So to consider the
    > > backward compatiblity issue, applications should support both
    > > "xmlns:office" and "xmlns:of". Is it right?
    
    Eike Rathke:
    > No, 'xmlns:of' will be a new namespace introduced for recalculated
    > formulas that follow the specification drafted by the formula
    > subcommittee, e.g. spreadsheet formulas in the table:formula attribute.
    > The specification work is informally known as OpenFormula (aka ODFF),
    > hence the 'of' name. See
    > http://www.oasis-open.org/committees/documents.php?wg_abbrev=office-formula
    
    I agree with Eike Rathke, and there's a good reason to do things this way.
    It's quite possible for an application to use JUST the OpenFormula spec without
    OpenDocument, or to use OpenDocument without using OpenFormula.
    That kind of flexibility will make it easier to use OpenDocument or just
    OpenFormula in different contexts, and thus, useful to a broader range of applications.
    
    --- David A. Wheeler
    


  • 8.  Re: [office] Namespace 'of' for formula expressions

    Posted 04-14-2008 10:47
    Hi David,
    
    On Friday, 2008-04-11 17:16:26 -0400, David A. Wheeler wrote:
    
    > Strictly speaking, from an XML point of view the "of" namespace alias could be any name; "aklfjsajfslkf:" would be fine as long as the matching namespace definition gave the same OpenFormula namespace.
    
    Correct, so having that described as "namespace alias is required to be
    'of'" isn't the right wording.
    
    > BUT: I think we _should_ limit or strongly encourage, the namespace
    > alias to be "of" exactly, at least when it's inside an OpenDocument
    > document.  The reason is that there are a lot of simple
    > tools/libraries that don't handle namespaces exactly "correctly".
    
    Which was the reasoning behind my thoughts. To encourage the use of 'of'
    the right wording probably would be, applications _should_ write the
    namespace alias 'of'.
    
      Eike
    
    -- 
     OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
    


  • 9.  Re: [office] Namespace 'of' for formula expressions

    Posted 04-14-2008 13:49

    If the alias is "of" 99% of the time, it still breaks simple tools.  We really either need to mandate a prefix ("shall") or state that it is is implementation-dependent behavior, as any other namespace alias would be.

    Of course, if someone tries to mix ODF with some other ML that makes the same claim about the absoluteness of the "of" alias, but uses it as an alias for another namespace, then the whole world breaks.

    What are we talking about, in the end, for application complexity to handle an arbitrary alias?  A hashtable of aliases to namespace URI's?  I think one can still have a very simple script and still allow a hashtable of that sort.

    -Rob


    "David A. Wheeler" <dwheeler@dwheeler.com> wrote on 04/11/2008 05:16:26 PM:

    > Eike Rathke:
    > > Pardon? Sorry, I'm not sure I got that question correctly. If you're
    > > referring whether aliasing the alias to arbitrary different names should
    > > be allowed: I don't think so. IMHO it should be a fixed value for
    > > simplicity, so yes, "of" would be the required namespace alias.
    >
    > Strictly speaking, from an XML point of view the "of" namespace
    > alias could be any name; "aklfjsajfslkf:" would be fine as long as
    > the matching namespace definition gave the same OpenFormula namespace.
    >
    > BUT: I think we _should_ limit or strongly encourage, the namespace
    > alias to be "of" exactly, at least when it's inside an OpenDocument
    > document.  The reason is that there are a lot of simple tools/
    > libraries that don't handle namespaces exactly "correctly".  If we
    > always use "of:", then the simple tools will work.... just grab the
    > strings, and yank off the "of:" in front.  We want people to be able
    > to develop simple tools to extract data from a document, and making
    > that prefixed fixed simplifies their lives.
    >
    > There is the problem of nesting; I suppose we could change it to
    > "should", if someone believes that's important.


  • 10.  Re: [office] Namespace 'of' for formula expressions

    Posted 04-14-2008 22:44
    I am going to use the terminology from the XML namespace standard[1]
    in this post.
    
    I see no harm in allowing different qualified names for a given
    namespace name. It's XML after all. If your tool so simple that it
    doesn't understand XML namespaces, then your tool shouldn't be marked
    compliant with an XML-based standard. Also, people who understand XML
    would be required to think about qualified names in ODF documents
    differently than other XML documents if we require the qualified name
    to be some fixed string.
    
    I think that the ODF standard should indicate which qualified names
    correspond to which namespace names for the purposes of interpreting
    the standard. However, the ODF standard should not require that
    certain qualified names be used in all ODF documents.
    
    [1]http://www.w3.org/TR/xml-names11/
    
    wt
    
    On Mon, Apr 14, 2008 at 6:49 AM,  


  • 11.  Re: [office] Namespace 'of' for formula expressions

    Posted 04-14-2008 23:15
    "Warren Turkal" 


  • 12.  Re: [office] Namespace 'of' for formula expressions

    Posted 04-14-2008 23:28
    
    
    
    
    David:

    While written material is a bit sparse, IMO there is some ambiguity around that issue.  Norm Walsh and others have worked on an XML test suite which tests both basic XML and XML NS support as part of “XML conformance”.

    http://www.w3.org/XML/Test/

    A conformant XML parser and DOM builder should also be able to correctly discern between a colon used as part of an XML nToken vs. a namespaced qualified element name.  If you look at JDOM, it has code that can disambiguate.

    A namespace should not be inferred unless the character array prior to the colon in an XML document is identical to a namespace prefix declared in the document.  The namespace attribute value itself has no meaning other than it must be unique, which is why URI’s are often used.

    Duane


    On 14/04/08 4:15 PM, "David A. Wheeler" <dwheeler@dwheeler.com> wrote:

    "Warren Turkal" <turkal@google.com>
    > I see no harm in allowing different qualified names for a given
    > namespace name. It's XML after all. If your tool so simple that it
    > doesn't understand XML namespaces, then your tool shouldn't be marked
    > compliant with an XML-based standard.

    As far as I can tell, tools are free to comply with the XML spec without implementing XML namespaces.

    In fact, the original XML 1.0 spec didn't have namespaces at all, so obviously you can comply with XML 1.0 and not have namespaces.  I just did a check and as far as I can tell, namespace support is not required for XML 1.1 either.  See:
    > http://www.w3.org/TR/xml11/
    Section 2.3 only has this: "The Namespaces in XML Recommendation [XML Names] assigns a meaning to names containing colon characters. Therefore, authors should not use the colon in XML names except for namespace purposes, but XML processors must accept the colon as a name character."  I interpret this as a "please don't use it in a completely different way" but I don't see anything here as a requirement to implement XML namespaces.

    It's the "Namespaces in XML 1.0 (Second Edition)" defines XML namespaces:
    > [1]http://www.w3.org/TR/xml-names11/
    it's required-by-reference by some other specs, but not XML itself (as far as I can tell).


    Second problem: Namespace processing, of the kind you're thinking of, is usually done by the external XML processor as a prefix to the names of XML attributes.  But that is NOT what we have here.  Instead, the namespace prefix (if used) is INSIDE THE ATTRIBUTE CONTENT ITSELF.  Like this:
    <table:table-cell
    table:style-name="ce1" table:formula="of:=AVERAGE([.B6:.B106])" office:value-type="percentage" office:value="0.916190476190476">

    We're trying to reuse namespace selectors, because they add flexibility.  But hooking it to the attribute name is not what we need.  It's not clear to me that XML libraries even let you query "what is the active set of namespace abbreviations at this point?", so it's not clear that you can even reasonably implement what you have in mind.

    This is not a new approach; this is CURRENTLY done with OpenOffice.org (they use oooc: instead of "of:").

    We can revisit this, of course, but we've started with existing practice for obvious reasons.

    --- David A. Wheeler

    ---------------------------------------------------------------------
    To unsubscribe from this mail list, you must leave the OASIS TC that
    generates this mail.  You may a link to this group and all your TCs in OASIS
    at:
    https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php



    --
    **********************************************************************
    "Speaking only for myself"
    Senior Technical Evangelist - Adobe Systems, Inc.
    Blog - http://technoracle.blogspot.com
    Community Music - http://www.mix2r.com
    My Band - http://www.myspace.com/22ndcentury
    Adobe MAX 2008 - http://technoracle.blogspot.com/2007/08/adobe-max-2008.html
    **********************************************************************


  • 13.  Re: [office] Namespace 'of' for formula expressions

    Posted 04-15-2008 07:05
    Warren Turkal wrote:
    > I am going to use the terminology from the XML namespace standard[1]
    > in this post.
    > 
    > I see no harm in allowing different qualified names for a given
    > namespace name. It's XML after all. If your tool so simple that it
    > doesn't understand XML namespaces, then your tool shouldn't be marked
    > compliant with an XML-based standard. Also, people who understand XML
    > would be required to think about qualified names in ODF documents
    > differently than other XML documents if we require the qualified name
    > to be some fixed string.
    
    I totally agree. Actually, our charter states as one requirement that
    
    "it [ODF] must be compatible with the W3C Extensible Markup Language 
    (XML) v1.0 and W3C Namespaces in XML v1.0 specifications,"
    
    So, an ODF application has to support namespaces.
    
    > 
    > I think that the ODF standard should indicate which qualified names
    > correspond to which namespace names for the purposes of interpreting
    > the standard. However, the ODF standard should not require that
    > certain qualified names be used in all ODF documents.
    
    That's what we say in section 1.3 Namespaces: "Table 1 lists the 
    namespaces that are defined by the OpenDocument schema and their default 
    prefixes." Or at least what we try to say.
    
    So, there is a prefix that we use in the specification and in the 
    schema, because without that, we could neither define a (namespace 
    aware) schema nor would the specification be interpretable. But it is a 
    feature of XML Namespaces and RNG that one can use other namespace 
    prefixes than those used in the schema, and I personally see absolutely 
    no reason why we should add restriction to ODF here. In particular, all 
    ODF application must have implemented namespace support already, so 
    allowing other prefixes than "of" for formulas really should not cause 
    any issues.
    
    
    Michael
    
    -- 
    Michael Brauer, Technical Architect Software Engineering
    StarOffice/OpenOffice.org
    Sun Microsystems GmbH             Nagelsweg 55
    D-20097 Hamburg, Germany          michael.brauer@sun.com
    http://sun.com/staroffice         +49 40 23646 500
    http://blogs.sun.com/GullFOSS
    
    Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1,
    	   D-85551 Kirchheim-Heimstetten
    Amtsgericht Muenchen: HRB 161028
    Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
    Vorsitzender des Aufsichtsrates: Martin Haering
    


  • 14.  Re: [office] Namespace 'of' for formula expressions

    Posted 04-15-2008 19:39
    Amen.
    
    wt
    
    On Tue, Apr 15, 2008 at 12:04 AM, Michael Brauer - Sun Germany - ham02
    - Hamburg