ISO-22537-2006.pdf

上传人:西安人 文档编号:3776457 上传时间:2019-09-23 格式:PDF 页数:110 大小:755.02KB
返回 下载 相关 举报
ISO-22537-2006.pdf_第1页
第1页 / 共110页
ISO-22537-2006.pdf_第2页
第2页 / 共110页
ISO-22537-2006.pdf_第3页
第3页 / 共110页
ISO-22537-2006.pdf_第4页
第4页 / 共110页
ISO-22537-2006.pdf_第5页
第5页 / 共110页
亲,该文档总共110页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

《ISO-22537-2006.pdf》由会员分享,可在线阅读,更多相关《ISO-22537-2006.pdf(110页珍藏版)》请在三一文库上搜索。

1、 Reference number ISO/IEC 22537:2006(E) ISO/IEC 2006 INTERNATIONAL STANDARD ISO/IEC 22537 First edition 2006-02-15 Information technology ECMAScript for XML (E4X) specification Technologies de linformation ECMAScript pour spcification XML (E4X) Copyright International Organization for Standardizatio

2、n Provided by IHS under license with ISO Licensee=IHS Employees/1111111001, User=Wing, Bernie Not for Resale, 04/03/2007 23:27:18 MDTNo reproduction or networking permitted without license from IHS -,-,- ISO/IEC 22537:2006(E) PDF disclaimer This PDF file may contain embedded typefaces. In accordance

3、 with Adobes licensing policy, this file may be printed or viewed but shall not be edited unless the typefaces which are embedded are licensed to and installed on the computer performing the editing. In downloading this file, parties accept therein the responsibility of not infringing Adobes licensi

4、ng policy. The ISO Central Secretariat accepts no liability in this area. Adobe is a trademark of Adobe Systems Incorporated. Details of the software products used to create this PDF file can be found in the General Info relative to the file; the PDF-creation parameters were optimized for printing.

5、Every care has been taken to ensure that the file is suitable for use by ISO member bodies. In the unlikely event that a problem relating to it is found, please inform the Central Secretariat at the address given below. ISO/IEC 2006 All rights reserved. Unless otherwise specified, no part of this pu

6、blication may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying and microfilm, without permission in writing from either ISO at the address below or ISOs member body in the country of the requester. ISO copyright office Case postale 56 CH-1211 Ge

7、neva 20 Tel. + 41 22 749 01 11 Fax + 41 22 749 09 47 E-mail copyrightiso.org Web www.iso.org Published in Switzerland ii ISO/IEC 2006 All rights reserved Copyright International Organization for Standardization Provided by IHS under license with ISO Licensee=IHS Employees/1111111001, User=Wing, Bern

8、ie Not for Resale, 04/03/2007 23:27:18 MDTNo reproduction or networking permitted without license from IHS -,-,- ISO/IEC 22537:2006(E) ISO 2006 All rights reserved iii Contents Foreword. v Introduction. vi 1 Scope 1 2 References1 2.1 Normative References.1 2.2 Informative References.1 3 Definitions

9、2 4 Conformance3 5 Motivation.3 5.1 The Rise of XML Processing 3 5.2 Current XML Processing Approaches.3 5.3 The E4X Approach.4 6 Design Principles.4 7 Notational Conventions 5 7.1 Algorithm Conventions.5 8 Lexical Conventions9 8.1 Context Keywords .10 8.2 Punctuators10 8.3 XML Initialiser Input Ele

10、ments11 9 Types.12 9.1 The XML Type.12 9.2 The XMLList Type22 9.3 The AttributeName Type .29 9.4 The AnyName Type30 10 Type Conversion30 10.1 ToString30 10.2 ToXMLString (input argument, AncestorNamespaces, IndentLevel)32 10.3 ToXML.35 10.4 ToXMLList.39 10.5 ToAttributeName40 10.6 ToXMLName.41 11 Ex

11、pressions42 11.1 Primary Expressions.42 11.2 Left-Hand-Side Expressions.48 11.3 Unary Operators.55 11.4 Additive Operators.56 11.5 Equality Operators.57 11.6 Assignment Operators58 12 Statements62 12.1 The default xml namespace Statement .62 12.2 The for-in Statement63 12.3 The for-each-in Statement

12、 65 13 Native E4X Objects67 13.1 The Global Object67 13.2 Namespace Objects.68 Copyright International Organization for Standardization Provided by IHS under license with ISO Licensee=IHS Employees/1111111001, User=Wing, Bernie Not for Resale, 04/03/2007 23:27:18 MDTNo reproduction or networking per

13、mitted without license from IHS -,-,- ISO/IEC 22537:2006(E) iv ISO/IEC 2006 All rights reserved 13.3 QName Objects .70 13.4 XML Objects.74 13.5 XMLList Objects92 14 Errors100 Annex A (normative) Optional Features.101 Copyright International Organization for Standardization Provided by IHS under lice

14、nse with ISO Licensee=IHS Employees/1111111001, User=Wing, Bernie Not for Resale, 04/03/2007 23:27:18 MDTNo reproduction or networking permitted without license from IHS -,-,- ISO/IEC 22537:2006(E) ISO 2006 All rights reserved v Foreword ISO (the International Organization for Standardization) and I

15、EC (the International Electrotechnical Commission) form the specialized system for worldwide standardization. National bodies that are members of ISO or IEC participate in the development of International Standards through technical committees established by the respective organization to deal with

16、particular fields of technical activity. ISO and IEC technical committees collaborate in fields of mutual interest. Other international organizations, governmental and non-governmental, in liaison with ISO and IEC, also take part in the work. In the field of information technology, ISO and IEC have

17、established a joint technical committee, ISO/IEC JTC 1. International Standards are drafted in accordance with the rules given in the ISO/IEC Directives, Part 2. The main task of the joint technical committee is to prepare International Standards. Draft International Standards adopted by the joint t

18、echnical committee are circulated to national bodies for voting. Publication as an International Standard requires approval by at least 75 % of the national bodies casting a vote. Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. IS

19、O and IEC shall not be held responsible for identifying any or all such patent rights. ISO/IEC 22537 was prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology, Subcommittee SC 22, Programming languages, their environments and system software interfaces, and was adopted (as Ecma

20、-357), under a special “fast-track procedure”, by Joint Technical Committee ISO/IEC JTC 1, Information technology, in parallel with its approval by national bodies of ISO and IEC. Copyright International Organization for Standardization Provided by IHS under license with ISO Licensee=IHS Employees/1

21、111111001, User=Wing, Bernie Not for Resale, 04/03/2007 23:27:18 MDTNo reproduction or networking permitted without license from IHS -,-,- ISO/IEC 22537:2006(E) vi ISO/IEC 2006 All rights reserved Introduction On 13 June 2002, a group of companies led by BEA Systems proposed a set of programming lan

22、guage extensions adding native XML support to ECMAScript (ISO/IEC 16262). The programming language extensions were designed to provide a simple, familiar, general purpose XML programming model that flattens the XML learning curve by leveraging the existing skills and knowledge of one of the largest

23、developer communities worldwide. The benefits of this XML programming model include reduced code complexity, tighter revision cycles, faster time to market, decreased XML footprint requirements and looser coupling between code and XML data. The ECMAScript group (Ecma TC39-TG1) unanimously agreed to

24、the proposal and established a sub-group to standardize the syntax and semantics of a general purpose, cross platform, vendor neutral set of programming language extensions called ECMAScript for XML (E4X). The development of this International Standard started on 8 August 2002. This Standard was dev

25、eloped as an extension to ECMAScript Edition 3, but may be applied to other versions of ECMAScript as well. This International Standard adds native XML datatypes to the ECMAScript language, extends the semantics of familiar ECMAScript operators for manipulating XML data and adds a small set of new o

26、perators for common XML operations, such as searching and filtering. It also adds support for XML literals, namespaces, qualified names and other mechanisms to facilitate XML processing. This International Standard will be integrated into future editions of ISO/IEC 16262 (ECMAScript). The ECMAScript

27、 group is working on significant enhancements for future editions of the ECMAScript language, including mechanisms for defining XML types using the XML Schema language and support for classes. Copyright International Organization for Standardization Provided by IHS under license with ISO Licensee=IH

28、S Employees/1111111001, User=Wing, Bernie Not for Resale, 04/03/2007 23:27:18 MDTNo reproduction or networking permitted without license from IHS -,-,- INTERNATIONAL STANDARD ISO/IEC 22537:2006(E) ISO/IEC 2006 All rights reserved 1 Information technology ECMAScript for XML (E4X) specification 1 Scop

29、e This International Standard defines the syntax and semantics of ECMAScript for XML (E4X), a set of programming language extensions adding native XML support to ECMAScript. 2 References 2.1 Normative References The following referenced documents are indispensable for the application of this documen

30、t. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies. ISO/IEC 10646:2003, Information Technology Universal Multiple-Octet Coded Character Set (UCS). ISO/IEC 16262:2001, ECMAScript Language Sp

31、ecification 2nd edition. Document Object Model (DOM) Level 2 Specifications, W3C Recommendation, 13 November 2000. Extensible Markup Language 1.0 (Second Edition), W3C Recommendation 6 October 2000. Namespaces in XML, W3C Recommendation, 14 January 1999. Unicode Inc. (1996), The Unicode StandardTM,

32、Version 2.0. ISBN: 0-201-48345-9, Addison-Wesley Publishing Co., Menlo Park, California. Unicode Inc. (1998), Unicode Technical Report #8: The Unicode StandardTM, Version 2.1. Unicode Inc. (1998), Unicode Technical Report #15: Unicode Normalization Forms. XML Information Set, W3C Recommendation 24 O

33、ctober 2001. XML Path Language (XPath) Version 1.0, W3C Recommendation 16 November 1999. XML Schema Part 1: Structures, W3C Recommendation, 2 May 2001. XML Schema Part 2: Datatypes, W3C Recommendation, 2 May 2001. 2.2 Informative References The following are non-normative references XSL Transformati

34、ons (XSLT), W3C Recommendation 16 November 1999. Copyright International Organization for Standardization Provided by IHS under license with ISO Licensee=IHS Employees/1111111001, User=Wing, Bernie Not for Resale, 04/03/2007 23:27:18 MDTNo reproduction or networking permitted without license from IH

35、S -,-,- ISO/IEC 22537:2006(E) 2 ISO/IEC 2006 All rights reserved 3 Definitions XML the Extensible Markup Language (XML) is an information encoding standard endorsed by the World Wide Web Consortium (W3C) for sending, receiving, and processing data across the World Wide Web. XML comprises a series of

36、 characters that contains not only substantive information, called character data, but also meta-information about the structure and layout of the character data, called markup. markup one of the two basic constituents of XML data (the other is character data). Markup is a series of characters that

37、provides information about the structure or layout of character data. Common forms of markup are start-tags, end-tags, empty-element tags, comments, CDATA tag delimiters, and processing instructions. character data one of the two basic constituents of XML data (the other is markup). Character data i

38、s a series of characters that represents substantive data encapsulated by XML markup. Character data is defined as any series of characters that are not markup. tag a single markup entity that acts as a delimiter for character data. A tag can be a start-tag, an end-tag, or an empty-element tag. Star

39、t-tags begin with a less than () character. End-tags begin with a pairing of the less than and slash characters () character. Empty-element begin with a less than () characters. element a data construct comprising two tags (a start-tag and an end-tag) that delimit character data or nested elements.

40、If neither character data nor nested elements exist for a given element, then the element can be defined by a single empty-element tag. Every well-formed XML document contains at least one element, called the root or document element. attribute an optional name-value pair, separated by an equal sign

41、 (=), that can appear inside a tag. Attributes can store information about an element or actual data that would otherwise be stored as character data. namespace a group of identifiers for elements and attributes that are collectively bound to a Uniform Resource Identifier (URI) such that their use w

42、ill not cause naming conflicts when used with identically named identifiers that are in a different namespace. processing-instruction a markup entity that contains instructions or information for the application that is processing the XML. Processing-instruction tags begin with a combination of the

43、less than (). type a set of data values. Copyright International Organization for Standardization Provided by IHS under license with ISO Licensee=IHS Employees/1111111001, User=Wing, Bernie Not for Resale, 04/03/2007 23:27:18 MDTNo reproduction or networking permitted without license from IHS -,-,-

44、ISO/IEC 22537:2006(E) ISO/IEC 2006 All rights reserve 3 4 Conformance A conforming implementation of E4X shall provide and support all the mandatory types, values, objects, properties, functions, and program syntax and semantics described in this specification. A conforming implementation of this St

45、andard shall conform to the ECMAScript Language Specfication, ISO/IEC 16262:2001. A conforming implementation of this Standard shall interpret characters in conformance with the Unicode Standard, Version 2.1 or later, and ISO/IEC 10646-1 with either UCS-2 or UTF-16 as the adopted encoding form, impl

46、ementation level 3. If the adopted ISO/IEC 10646-1 subset is not otherwise specified, it is presumed to be the BMP subset, collection 300. If the adopted encoding form is not otherwise specified, it presumed to be the UTF-16 encoding form. A conforming implementation of E4X may provide additional ty

47、pes, values, objects, properties, and functions beyond those described in this specification. In particular, a conforming implementation of E4X may provide properties not described in this specification, and values for those properties, for objects that are described in this specification. A conform

48、ing implementation of E4X shall not provide methods for XML.prototype and XMLList.prototype other than those described in this specification. 5 Motivation This section contains a non-normative overview of the motivation behind ECMAScript for XML. 5.1 The Rise of XML Processing Developing software to create, navigate and manipulate XML data is a significant part of every developers job. Developers are inundated with data encoded in the eXtensible Markup Language (XM

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 其他


经营许可证编号:宁ICP备18001539号-1