none
ECMA-376 has some discrepancy RRS feed

  • Question

  • In ECMA-376 (4-th Edition), in Part 1 "Fundamentals And Markup Language Reference" there's a table on page 97 which shows which content types the Workbook Part can have. They are:

    1) application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml
    2) application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml

    However, it is NOT the full list, as of I know. There must be also:

    1) application/vnd.ms-excel.sheet.macroEnabled.main+xml (for macro-enabled)

    2) application/vnd.ms-excel.addin.macroEnabled.main+xml (for macro-enabled add-ins)

    Moreover, I could not find, why all these Parts have "http://purl.oclc.org/ooxml/spreadsheetml/main" as  Root Namespace while in reality, for instance for Workbook Part, there is "http://schemas.openxmlformats.org/spreadsheetml/2006/main" namespace?

    I guess there IS some explanation to this discrepancy.


    There is no knowledge that is not power.



    • Edited by JohnyL Tuesday, April 28, 2015 6:01 PM
    Tuesday, April 28, 2015 1:05 PM

All replies

  • Hello JohnyL,

    Thank you for your question. A member of the protocol documentation team will respond to you soon.

    Best regards,
    Matt Weber | Microsoft Open Specifications Team

    Tuesday, April 28, 2015 4:41 PM
  • Hello JohnyL,

    I will be working with you on this issue. I'm researching your questions and I will post my findings in this thread.

    Thanks,
    Kamil Sykora

    Tuesday, April 28, 2015 5:59 PM
  • Hello JohnyL,

    With regards to application/vnd.ms-excel.sheet.macroEnabled.main+xml

    This content type is defined in [MS-OFFMACRO]:

    2.2.1.1 Workbook
    Content Type(s):
    application/vnd.ms-excel.sheet.macroEnabled.main+xml
    application/vnd.ms-excel.template.macroEnabled.main+xml
    Root Namespace: http://schemas.openxmlformats.org/spreadsheetml/2006/main
    Source Relationship: http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument
    This part is specified in [ECMA-376] Part 1, Section 12.3.23.

    and [MS-OFFMACRO2]:

    2.2.1.4 Workbook
    Content Types:
    application/vnd.ms-excel.sheet.macroEnabled.main+xml
    application/vnd.ms-excel.template.macroEnabled.main+xml
    Root Namespace: http://schemas.openxmlformats.org/spreadsheetml/2006/main
    Source Relationship: http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument
    This part is modified from the part specified in [ISO/IEC29500-1:2011] Part1, section 12.3.23.

    The ECMA-376 does not define these content types since they are not part of the macro-free file format that the standard describes.

    Please let me know if this help. I'm still researching your other questions.

    Thanks,
    Kamil Sykora

    Thursday, April 30, 2015 8:43 PM
  • @Kamil

    Thanks a lot! I didn't think to take a look at these specs. Yes, you have fully answered my first question. But! This answer concerns macro-enabled workbook.

    The second question, however, concerns both macro-free and macro-enabled workbook. The section 2.2.1.1 of MS-OFFMACRO, however, does not tell us, what is the Root Namespace of macro-free workbook!

    Well, I have this namespace in following documents:

    1) MS-OI29500, 2.1.11 Part 1 Section 12.3.20, Styles Part, which says that "Office requires the Root Namespace to be http://schemas.openxmlformats.org/spreadhseetml/2006/main".

    2) MS-OE376, 2.1.15 Part 1 Section 12.3.20, Styles Part, which says the same thing as 1).

    3) MS-XLSX, 5.3, which is Appendix for Full XML Schema (there's import of this namespace).

    These are the places where this namespace is mentioned in Files Specifications. There's nothing about root namespace for macro-free workbook.  So, where I can find that "http://schemas.openxmlformats.org/spreadsheetml/2006/main" must be the Root Namespace for the macro-free Workbook Part? Thanks.


    There is no knowledge that is not power.

    Thursday, April 30, 2015 10:18 PM
  • Hi JohnyL,

    I'm glad that answers the first question. I am researching the follow-up and will post as soon as I have more info for you.

    Thanks,
    Kamil Sykora

    Friday, May 1, 2015 3:05 PM
  • Hello JohnyL,

    [MS-OE376] references the first edition of the ECMA-376. Please note the following statement in the 1.2.1 Normative References section:

    [ECMA-376] ECMA International, "Office Open XML File Formats", 1st Edition, ECMA-376, December 2006, http://www.ecma-international.org/publications/standards/Ecma-376.htm

    In this document, the namespace is defined as:

    12.3.20 Styles Part
    Content Type: application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml
    Root
    Namespace:
    http://schemas.openxmlformats.org/spreadsheetml/2006/mains
    Source
    Relationship:
    http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles

    [MS-OE376] then describes the namespace that it uses:

    2.1.15 Part 1 Section 12.3.20, Styles Part
    a. The standard specifies the Root Namespace for the Styles Part as http://schemas.openxmlformats.org/spreadsheetml/2006/mains.
    Office requires the Root Namespace to be http://schemas.openxmlformats.org/spreadhseetml/2006/main.

    The namespace changed in [ECMA-376] between 1st and 4th editions. Furthermore, in the 4th edition of [ECMA-376], part 4, Transitional Migration Features it states:

    10.1.20 Styles Part (Part 1, §12.3.20)
    Root
    Namespace:
    http://schemas.openxmlformats.org/spreadsheetml/2006/main
    Source
    Relationship:
    http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles

    Please let me know if that clarifies the issue.

    Thanks,
    Kamil Sykora

    Monday, May 4, 2015 5:28 PM
  • @Kamil

    I see that MS-OE376 refers the 1-st Edition, and the 1-st Edition HAS this namespace. But how can I infer that I MUST take it from the 1-st Edition? Styles part is just about styles - not Workbook Part.

    So, how can I infer that I should use the namespace from the 1-st Edition? The Foreword of the 1-st Part of 4-th Edition says:

    "Changes from the 3rd edition were made to align this 4th edition Standard with ISO/IEC 29500:2012. Both this 4th edition and ISO/IEC 29500:2012 refer to the 1st edition. As such, this 4th edition does not cancel or replace the 1st edition."

    and

    "The document representation formats defined by this Part are different from the formats defined in the
    corresponding Part of ECMA-376:2006. Some of the differences are reflected in schema changes, as shown in Annex M of this Part."

    This effectively says that this 4-th Edition has differences with 1-st Edition which are reflected in Annex M. There's nothing about changing namespace.

    So, please, show me the exact text which says that I should use the namespace from the 1-st Edition. Thanks!


    There is no knowledge that is not power.

    Monday, May 4, 2015 6:18 PM
  • Hi JohnyL,

    The answer depends on what you are trying to accomplish. It's not clear to me if you are trying to interpret how Microsoft Office generates documents or if you are trying to decide how you want to generate documents that conform to the Office Open XML standard. Furthermore, if you are generating documents, there is a consideration for which version of the standard you want to implement, and which version of Office you want to interoperate with. If you could provide more detail about your goals, I can provide more guidance.

    The ECMA-376 standard allows the use of both of the namespaces (1st edition, as well as 4th edition in the transitional section). Using the older http://schemas.openxmlformats.org/spreadhseetml/2006/main namespace would allow you to interoperate with a wider range of applications that implement the older versions of the standard. Using the newer http://purl.oclc.org/ooxml/spreadsheetml/main namespace would make your document conform to the Office Open XML standard strict format but would reduce the number of products that your documents would be compatible with.


    Thanks,
    Kamil Sykora

    Tuesday, May 5, 2015 5:35 PM
  • My goal is to read Microsoft Office Excel files - getting structure info, retrieving images etc. But I can't understand this mess with namespaces. For instance, which Edition does Excel 2013 use? If it's 4-th Edition, then why macro-free Workbook Part uses the namespace from the 1-st Edition? The XML Schema in 4-th Edition also has different namespace from the 1-st Edition. Since Excel 2013 Workbook Part uses "http://schemas.openxmlformats.org/spreadhseetml/2006/main", would it be correct to assume that the 2-nd Edition is being used (since 3-rd Edition introduces another namespace)?

    Anyway, I do not understand why keeping around the Standard since every implementer can alter/introduce its own set of markup? What's the point? The mess is about going from Standard and implementer structure, and this brings the mess.

    I will explain here: from the very beginning I thought the Standard is what I can base my consumer application on. But for now I understand that there can also be some "producers" (say, me), who can develop their own markup, namespaces etc.? Am I correct?


    There is no knowledge that is not power.

    Tuesday, May 5, 2015 7:22 PM
  • Hello JohnyL,

    The latest standards allow both of these namespaces:
    http://purl.oclc.org/ooxml/spreadsheetml/main
    and
    http://schemas.openxmlformats.org/spreadsheetml/2006/main
    (see reference section below)
    These are the only namespaces you should have to know about for the Styles Part.

    The first is used for SML Strict documents and the second is for transitional documents (for backwards compatibility reasons). The standards evolved in conjunction with different product versions and so originally only the second namespace applied. Later versions added the new namespace for strict documents.

    Excel 2013 implements ISO/IEC 29500:2012 which is functionally equivalent to ECMA 376 4th edition. The implementation notes that describe how Excel implements the standards is captured in the implementation documents [MS-OE376] (Excel 2007-2010) and [MS-OI29500] (Excel 2010-2013). The notes specify that Excel uses the transitional features. The implementation documents are important to reference when understanding specific product behavior in how they implement the standards since the standards do allow variations.

    Note that the implementation notes appear to reference an older standard that had "s" at the end of the namespace. The newer standards do not have the s anymore so the note does seem superfluous without the historical context. There is also a possible typo in the implementation documents (h and s interchanged) that I'm still following up on.

    Please let me know if this clarifies the situation or if I missed a detail.

    References:

    ECMA 4th edition Part 1:
    12.3.20 Styles Part
    Content Type: application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml
    Root Namespace: http://purl.oclc.org/ooxml/spreadsheetml/main
    Source Relationship: http://purl.oclc.org/ooxml/officeDocument/relationships/styles

    ECMA 4th edition Part 4:
    10.1.20 Styles Part (Part 1, §12.3.20)
    Root Namespace: http://schemas.openxmlformats.org/spreadsheetml/2006/main
    Source Relationship: http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles

    ISO/IEC 29500-1:2012
    12.3.20 Styles Part
    Content Type: application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml
    Root Namespace: http://purl.oclc.org/ooxml/spreadsheetml/main
    Source Relationship: http://purl.oclc.org/ooxml/officeDocument/relationships/styles

    ISO/IEC 29500-4:2012
    10.1.20 Styles Part (Part 1, §12.3.20)
    Root Namespace: http://schemas.openxmlformats.org/spreadsheetml/2006/main
    Source Relationship: http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles

    MS-OE376
    2.1.15 Part 1 Section 12.3.20, Styles Part
    a. The standard specifies the Root Namespace for the Styles Part as http://schemas.openxmlformats.org/spreadsheetml/2006/mains.
    Office requires the Root Namespace to be http://schemas.openxmlformats.org/spreadhseetml/2006/main.

    MS-OI29500
    2.1.11 Part 1 Section 12.3.20, Styles Part
    a. The standard specifies the Root Namespace for the Styles Part as http://schemas.openxmlformats.org/spreadsheetml/2006/mains.
    Office requires the Root Namespace to be http://schemas.openxmlformats.org/spreadhseetml/2006/main.

    Thanks,
    Kamil Sykora

    Wednesday, May 6, 2015 7:40 PM
  • Hello JohnyL,

    Please let me know if the above information answers your questions or if there are any outstanding items.

    Thanks,
    Kamil Sykora

    Wednesday, May 13, 2015 6:02 PM
  • @Kamil

    Thanks for answer! I will look it through and will let you know. Thanks once again! :)


    There is no knowledge that is not power.

    Wednesday, May 20, 2015 5:26 AM