13 Security Lab

[번역] OFFICE OPEN XML OVERVIEW (White Paper) 본문

Computer Security/Security Articles

[번역] OFFICE OPEN XML OVERVIEW (White Paper)

Maj0r Tom 2018. 10. 6. 00:20

[ECMA] OFFICE OPEN XML OVERVIEW  

https://www.ecma-international.org/news/TC45_current_work/OpenXML%20White%20Paper.pdf 


ECMA TC45
T
OM NGO (NEXTPAGE), EDITOR 

- Overview 의 내용이 생각보다 많아 이를 다시 요약하는 것으로 정리



1. INTRODUCTION


Office Open XML (OpenXML) 은 워드 프로세싱 문서(Word), 프레젠테이션,(Power Point) 스프레드시트(엑셀) 에 대한 공개 표준(Open Standard) 입니다.


이 공개 표준을 통해서 여러 플랫폼의 여러 어플리케이션에서 자유롭게 구현 할 수 있습니다. 


이 Publication은 상업적 사용을 위한 조직, 정부조직 또는 소프트웨어를 조달하거나, Open XML를 가르치는 교육 조직들에게 유용할 수 있도록 의도되었습니다.  


궁극적으로 모든 유저들은 그들의 문서를 위해서 안정성, 보존성,  확장성,  커스터마이징 된 스키마(custom schemas), subsetting, 다양한 플랫폼, 국제화, 접근성의 이득을 얻을 수 있습니다.


이 작업은 ECMA INnternationa의 Technical Committee 45 (TC45) 를 통해 OpenXML 를 추진하였습니다.

TC45는 다음의 조직들을 대표하고 있습니다.

 - Apple, Barclays Capital, BP, The British Library, Essilor, Intel, Microsoft, NextPage, Novell, Statoil, Toshiba, and the United States Library of Congress (1).


이 백서(white paper)는 OpenXML 를 요약하고 있으며 다음의 목적을 위해서 읽습니다.

 - OpenXML과 사양(스펙, Specification)의 구조 를 이해하기 위해서


 - 다음의 속성들을 알기위해서:  

Backward compatibility, preservation, extensibility, custom schemas, subsetting, multiple platforms, internationalization, and accessibility 를 어떻게 나타내고 있는지 알기 위해서


 - 고수준의 Open XML의 구조를 따라가는 법을 배우고, 당신이 원하는 요구사항들로부터 Open XML의 스펙 어느부분이나 빠르게 다루고 찾아갈 수 있도록 알 수 있도록



2. PURPOSES FOR THE STANDARD
OpenXML은 마이크로소프트에서 정의한 인코딩된 바이너리 포맷으로 기존에 존재하는 워드프로세서 문서, 프레젠테이션, 스프레드 시트의 자료형(Corpus)을 충실하게 표현할 수 있도록 설계되었습니다.


표준화 프로세스는 기존 자료형(Corpus)을 표현하고, 확장하고, 자세한 문서를 제공하고, 상호 운용성을 활성화하는 데 필요한 기능을 XML에서 미러링하는 것으로 구성되었습니다.


글을 쓰는 시점에 4억명이 넘는 사용자가 이 포맷으로 문서를 생성하고 있으며, 40억개의 문서와 그 이상이 매년 생성 될 것으로 예측합니다.


원래의 바이너리포맷은 공간이 귀하고 구문 분석시간이 UX(User Experience)에 심각한 영향을 미쳤던 시기에 만들어졌습니다.


이는 마크로소프트의 직접적인 직렬화(serialization)를 기반으로 메모리 내 데이터 구조가 사용된 것입니다.


모던한 하드웨어, 네트워크, 표준 인프라(특히 XML)에서는 다음과 같은 선호 된 디자인의 구현을 허용하고 있습니다.


이러한 기술적 진보와 동시에 시장은 문서 편집 프로그램의 단순한 세계에서 원래 고려되지 않은 새로운 범위의 응용프로그램을 포함하도록 다양화 되었습니다. 


이러한 응용프로그램에는 다음과 같은 응용 프로그램이 포함됩니다.


  • generate documents automatically from business data;
  • extract business data from documents and feed those data into business applications;
  • perform restricted tasks that operate on a small subset of a document, yet preserve editability;
  • provide accessibility for user populations with specialized needs, such as the blind; or
  • run on a variety of hardware, including mobile devices.


바이너리 형식, 기술 발전, 다양한 애플리케이션을 필요로하는 시장 세력 및 장기 보존의 어려움의 증가와 같은 이 네 가지 요소의 출현으로 인해 개방형 XML 형식을 정의하고 수십억 개의 가능한 적은 손실로 서류를 제출하십시오.


더욱이 개방형 XML 형식을 표준화하고 시간을두고 관리하면 표준 개발 프로세스가 표준 프로세스에서 제공하는 검증과 균형을 누릴 수 있다고 확신하면서 모든 조직이 지속적으로 사양의 안정성에 의존 할 수있는 환경을 조성합니다.



3. STRUCTURE OF THE STANDARD


OpenXML defines formats for word-processing, presentation, and spreadsheet documents. Each type of document is specified
through a primary markup language: WordprocessingML, PresentationML, or SpreadsheetML. Embedding mechanisms permit a
document of any one of these three types to contain material in the other primary markup languages and in a number of
supporting markup languages.


The Specification contains both normative material (material that defines OpenXML) and informative material (material that aids the reader’s understanding but is not prescriptive). It is structured in Parts to meet the needs of varying audiences.
  


Part 1 – Fundamentals 165 pages

  • Defines vocabulary, notational conventions, and abbreviations.
  • Summarizes the three primary markup languages and the supporting markup languages.
  • Establishes conditions for conformance and provides interoperability guidelines.
  • Describes the constraints within the Open Packaging Conventions that apply to each document type.


Part 2 – Open Packaging Conventions 125 pages

  • Defines the Open Packaging Conventions (OPC). Every OpenXML file comprises a collectionof byte streams called parts, combined into a container called a package. The packaging format is defined by the OPC.
  • Describes a recommended physical implementation of the OPC that uses the Zip file format.
  • Declares the XML schemas for the OPC as XML Schema Definitions (XSD) (2), in an annex that is issued only in electronic form. The annex also includes non-normative representations of the schemas using RELAX NG (ISO/IEC 19757-2) (3).

Part 3 – Primer 466 pages
  • Introduces the features of each markup language, providing context and illustrating elements through examples and diagrams. This Part is informative (non-normative).
  • Describes the facility for storing custom XML data within a package to support integration with business data


Part 4 – Markup Language Reference 5756 pages
  • Defines every element and attribute, the hierarchy of parent/child relationships for elements, and additional semantics as appropriate. This Part is intended for use as a reference whenever complete detail about an element or attribute is required.
  • Defines the facility for storing custom XML data.
  • Declares the XML schemas for the markup languages as XSD (2), in an annex that is issued only in electronic form. The annex also expresses them non-normatively using RELAX NG (ISO/IEC 19757-2) (3)


Part 5 – Markup Compatibility and Extensibility 34 Pages

  • Describes facilities for extension of OpenXML documents.
  • Specifies elements and attributes by which applications with different extensions can interoperate.
  • Expresses extensibility rules using NVDL (ISO/IEC 19757-4) (4)


4. PROPERTIES OF THE STANDARD

INTEROPERABILITY와 COMPACTNESS, MODULARITY, INTEGRATION 등에 대해서 다루고 있어 구조와 큰 연관이 없어 이 문서에서는 다루지 않겠습니다.


4.1 INTEROPERABILITY


4.2 INTERNATIONALIZATION

Text orientation:

Text flow:

Number representation

Date representation

Formulas

Language identifiers


4.3 LOW BARRIER TO DEVELOPER ADOPTION



4.4 COMPACTNESS



4.5 MODULARITY



4.6 HIGH FIDELITY MIGRATION



4.7 INTEGRATION WITH BUSINESS DATA

Search

Metadata tagging

Document assembly

Data reuse

Line-of-business applications


4.8 ROOM FOR INNOVATION

Visual fidelity:

Editability

Privacy



5. STRUCTURE OF AN OFFICE OPEN XML DOCUMENT  

이 백서의 우선적인 목적은 읽는이가 고수준의 OpenXML 구조를 따를 수 있도록 하는 것이다.

이 것을 가능하도록 하기 위해서, "OPC"(Open Packaging Conventions)의 적당한 수준의 디테일을 제공하고 ML(markup language)에 대해서 적은 양의 디테일을 다루도록 한다.


5.1 OPEN PACKAGING CONVENTIONS


OPC는 문서로 표현될 수 있는 컨테이너(e.g. ZIP) 안의 다수의 컨텐츠타입(e.g. XML, image, and metadata)을 저장할 방법을 제공한다. 

Containment와 Relationship 에 대한 논리적 모델을 설명하고자 한다.


OPC 구현에 대한 추천 되는 구현 방법은 ZIP 아카이브 포맷을 사용하는 것이다.

누구나 그냥 ZIP viewer를 통해서 OpenXML 구조에 맞게 따라가면 된다.


  • 논리적으로 볼때, OpenXML 문서는 OPC package이다(§5:8).
  • Package는 "Part"들의 "Flat Collation"이다(§5:8.1).
  • 각 "Part" 는 case-insensitive "Part Name"을 가지고 있다. 
  • 그 것은 /(슬래쉬)로 구분 된 순서의 세그먼트 이름 예를 들면  “/pres/slides/slide1.xml” 처럼 되어 있다. (§5:8.1.1).
  • 또한 각 "Part"는 "Content Type"을 가지고 있다 (§5:8.1.2).
  • 물리적으로 ZIP 아카이브는 하나의 Package 이지만, 하나의 아카이브에 들어있는 각각의 ZIP Item 들은 하나의 "Part" 이고, 하나의 "PathName"을 가진다. 
  • ZIP 아카이브에서 "/[Content_Types].xml" 는 "Package"에서 사용자가 모든 "Part"의 컨텐츠 타입을 결정할 수 있도록 허용한다.(§2:9.2.6) 
    미디어타입의 그 문법(Syntax)과 정의(Definition) 는 다음에서 다뤄진다.  section 3.7 of RFC 2616 (13).  
  • "Package"와 "Part"는 다른 Package 안의 Part로의 "explicit relationships"을 포함하고 있다.(§1:9.2) 
  • 외부 리소스참조를 위해서 모든외부참조관계는 "Part"의 컨텐츠에서 참조하고 그 타입을 특정할 수 있도록 "relationship ID"를 가지고 있다.
  • 해당 ID를 통해서 어플리케이션이 어떻게 동작할지를 결정한다.
  • "Relationship Type"은 "URI"들을 통해서 이름이 붙는다. 이를 통해 "Part"들끼리 충돌없이 새로운 유형을 만들 수 있도록 한다.
  • 주어진 "source package" 또는 "Part" 들의 외부참조관계들의 Set은 "relationships part" 에 저장된다.
  • 그것 전체는 "/_rels/.rels" 로 불린다. 예를들면 Part 관계들을 위한 Part로서 "/a/b/c.xml" 를 "a/b/c/_rels/c.xml.rels"로 부른다.
  • "Relationships parts"는 Package의 이름이 특별히 붙여진것이다. Package를 열기 위해서는, 어플리케이션은 "package-relationships" part와 따라오는 적절한 타입들의 관계를 파싱해야한다.


5.2 WORDPROCESSINGML


  • "story"들의 컬렉션으로 되어있다.
  • 각 "story" 들은 다음의 구성 요소이다.
    -  main document / glossary document / subdocument / header/ footer/ comment / frame / text box / footnote or end note

  • 위 story 중에서 main document 만 필수요소이다.
  • 각 패키지 관계의 타겟타입은 다음에서 확인한다.
    - http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument  
  • XML 구성요소는 다음과 같은 것들이 있다.
    - document
    - body
    - p
    - r
    - t


5.3 PRESENTATIONML



5.4 SPREADSHEETML



5.5 SUPPORTING MARKUP LANGUAGES



5.6 MINIMAL WORDPROCESSINGML DOCUMENT

워드 프로세스 Markup Language 문서의 세 파트를 설명한다.


Part: content-type "/[Content_Types].xml" 다른 두 파트의 컨텐츠 타입을 명세한다.


Part: package-relationship "/_rels/.rels" Package와 메인 문서 Part 의 관계를 명세한다.



Part: document. "/document.xml" 문서의 컨텐츠 정보를 포함하고 있다.

아래 예시를 참고한다.



The Specification provides minimal documents and additional detail for WordprocessingML (§1:11.2), PresentationML
(§1:13.2), and SpreadsheetML (§1:12.2).
  


6. SUMMARY  

- 생략 


7. CITATIONS
- 원본과 동일


1. Ecma international. TC45 - Office Open XML Formats. Ecma International. [Online] http://www.ecmainternational.org/memento/TC45.htm.

2. W3C. XML Schema. World Wide Web Consortium. [Online] http://www.w3.org/XML/Schema.

3. ISO. ISO/IEC 19757-2:2003. International Organization for Standardization. [Online]

http://www.iso.org/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=37605&ICS1=35&ICS2=240&ICS3=30.

4. ISO. ISO/IEC 19757-4:2006. International Organization for Standardization. [Online]

http://www.iso.org/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=38615&ICS1=35&ICS2=240&ICS3=30.

5. W3C. Extensible Markup Language (XML) 1.0 (Fourth Edition). World Wide Web Consortium. [Online] 2006.

http://www.w3.org/TR/2006/REC-xml-20060816/.

6. W3C. Namespaces in XML 1.0 (Second Edition). World Wide Web Consortium. [Online] 2006.

http://www.w3.org/TR/2006/REC-xml-names-20060816/.

7. XBRL International. XBRL Specifications. Extensible Business Reporting Language. [Online]

http://www.xbrl.org/Specifications/.

8. Health Level Seven. HL7 ANSI-Approved Standards. Health Level Seven. [Online]

http://www.hl7.org/about/directories.cfm?framepage=/documentcenter/public/faq/ansi_approved.htm.

9. W3C. W3C Web Services Architecture. World Wide Web Consortium. [Online] 2002. http://www.w3.org/2002/ws/.

10. W3C. W3C XML Signature. World Wide Web Consortium. [Online] http://www.w3.org/Signature/.

11. W3C. W3C XML Encryption. World Wide Web Consortium. [Online] 2001. http://www.w3.org/Encryption/2001/.

12. W3C. XSL and XSLT. World Wide Web Consortium. [Online] http://www.w3.org/Style/XSL/.

13. W3C. Hypertext Transfer Protocol -- HTTP/1.1. World Wide Web Consortium. [Online]

http://www.w3.org/Protocols/rfc2616/rfc2616.html.




Comments