1、BSI Standards PublicationBS ISO 16684-2:2014Graphic technology Extensible metadata platform(XMP)Part 2: Description of XMP schemas usingRELAX NGBS ISO 16684-2:2014 BRITISH STANDARDNational forewordThis British Standard is the UK implementation of ISO 16684-2:2014. The UK participation in its prepara
2、tion was entrusted to TechnicalCommittee PAI/43, Graphic technology.A list of organizations represented on this committee can be obtained on request to its secretary.This publication does not purport to include all the necessary provisions of a contract. Users are responsible for its correct applica
3、tion. The British Standards Institution 2014.Published by BSI Standards Limited 2014ISBN 978 0 580 80114 3 ICS 35.240.30; 37.100.99 Compliance with a British Standard cannot confer immunity from legal obligations.This British Standard was published under the authority of the Standards Policy and Str
4、ategy Committee on 31 December 2014.Amendments/corrigenda issued since publicationDate T e x t a f f e c t e d ISO 2014Graphic technology Extensible metadata platform (XMP) Part 2: Description of XMP schemas using RELAX NGTechnologie graphique Plate-forme de mtadonnes extensibles (XMP) Partie 2: Des
5、cription des schmas XMP utilisant RELAX NGINTERNATIONAL STANDARDISO 16684-2First edition 2014-12-01Reference number ISO 16684-2:2014(E)BS ISO 16684-2:2014ISO 16684-2:2014(E)ii ISO 2014 All rights reservedCOPYRIGHT PROTECTED DOCUMENT ISO 2014All rights reserved. Unless otherwise specified, no part of
6、 this publication may be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting on the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address below or ISOs member body i
7、n the country of the requester.ISO copyright officeCase postale 56 CH-1211 Geneva 20Tel. + 41 22 749 01 11Fax + 41 22 749 09 47E-mail copyrightiso.orgWeb www.iso.orgPublished in SwitzerlandBS ISO 16684-2:2014ISO 16684-2:2014(E)Contents PageForeword ivIntroduction v1 Scope . 12 Normative references 1
8、3 Terms and definitions . 14 Conformance . 25 Canonical serialization of XMP 25.1 General . 25.2 XMP packet serialization 25.3 Property serialization . 25.4 Structure value serialization . 35.5 Array value serialization . 35.6 Qualifier serialization 36 RELAX NG idioms for XMP. 36.1 General . 36.2 M
9、odularization 46.3 Use of data types 46.4 RELAX NG for properties 66.5 RELAX NG for XMP packets 76.6 RELAX NG for qualifiers 86.7 Extensions . 96.8 Extension for providing UI information 97 RELAX NG schemas 10Annex A (informative) RELAX NG schema for standard data types .11Annex B (informative) RELA
10、X NG schema for the Dublin Core namespace 25Annex C (informative) RELAX NG schema for the XMP namespace .31Annex D (informative) RELAX NG schema for the XMP Media Management namespace .34Annex E (informative) RELAX NG schema for the XMP Rights Management namespace36Annex F (informative) RELAX NG sch
11、ema for a complete XMP packet .38Bibliography .39 ISO 2014 All rights reserved iiiBS ISO 16684-2:2014ISO 16684-2:2014(E)ForewordISO (the International Organization for Standardization) is a worldwide federation of national standards bodies (ISO member bodies). The work of preparing International Sta
12、ndards is normally carried out through ISO technical committees. Each member body interested in a subject for which a technical committee has been established has the right to be represented on that committee. International organizations, governmental and non-governmental, in liaison with ISO, also
13、take part in the work. ISO collaborates closely with the International Electrotechnical Commission (IEC) on all matters of electrotechnical standardization.The procedures used to develop this document and those intended for its further maintenance are described in the ISO/IEC Directives, Part 1. In
14、particular the different approval criteria needed for the different types of ISO documents should be noted. This document was drafted in accordance with the editorial rules of the ISO/IEC Directives, Part 2 (see www.iso.org/directives). Attention is drawn to the possibility that some of the elements
15、 of this document may be the subject of patent rights. ISO shall not be held responsible for identifying any or all such patent rights. Details of any patent rights identified during the development of the document will be in the Introduction and/or on the ISO list of patent declarations received (s
16、ee www.iso.org/patents). Any trade name used in this document is information given for the convenience of users and does not constitute an endorsement.For an explanation on the meaning of ISO specific terms and expressions related to conformity assessment, as well as information about ISOs adherence
17、 to the WTO principles in the Technical Barriers to Trade (TBT) see the following URL: Foreword - Supplementary informationThe committee responsible for this document is ISO/130 Graphic technology.ISO 16684 consists of the following parts, under the general title Graphic technology Extensible metada
18、ta platform (XMP): Part 1: Data model, serialization, and core properties Part 2: Description of XMP schemas using RELAX NGiv ISO 2014 All rights reservedBS ISO 16684-2:2014ISO 16684-2:2014(E)IntroductionISO 16684 (all parts) defines aspects of the Extensible Metadata Platform (XMP) that are generic
19、, neutral to the domain of usage. Refer to the Introduction in ISO 16684-1 for general information. This part of ISO 16684 is about description of XMP schemas for formal or mechanical validation of XMP. RELAX NG has been chosen as the schema language. It is an ISO standard, ISO/IEC 19757-2, and is b
20、oth powerful and easy to use.There are two major components of formal validation, schemas and validation engines. A schema, or schema file, is a formal description of constraints regarding the structure and contents of properties in an XMP packet, on top of the requirements for conforming XMP packet
21、s as mandated by ISO 16684-1. A validation engine is a software tool that compares an input XMP packet to one or more schemas, and produces a report on whether the XMP packet conforms to the schemas.This part of ISO 16684 defines policies for validation engines to follow so that schemas can be share
22、d, so that the schemas do not require customization for each validation engine. It also defines policies for schemas to follow in order to operate with a conforming validation engine, and to make the schemas robust and modular.This part of ISO 16684 does not address how a validation engine reports s
23、uccess or failure. Reporting success is easy, reporting failure can be complicated by a number of factors. It can be difficult to relate a specific RDF usage error to a human-understood XMP data model. Recovery from one error can be difficult, masking other errors after the first. As an open model,
24、creation of new data items in XMP is expected. Allowing for this in schemas and/or clear reporting of unexpected input when validating can be difficult. ISO 2014 All rights reserved vBS ISO 16684-2:2014BS ISO 16684-2:2014Graphic technology Extensible metadata platform (XMP) Part 2: Description of XM
25、P schemas using RELAX NG1 ScopeThis part of ISO 16684 specifies the use of RELAX NG to describe serialized XMP metadata. This applies to how conforming schemas can use the features of RELAX NG.2 Normative referencesThe following documents, in whole or in part, are normatively referenced in this docu
26、ment and are indispensable for its application. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.ISO 16684-1:2012, Graphic technology Extensible metadata platform (XMP) specification Part 1:
27、 Data model, serialization and core propertiesISO/IEC 19757-2, Information technology Document Schema Definition Language (DSDL) Part 2: Regular-grammar-based validation RELAX NG3 Terms and definitionsFor the purposes of this document, the following terms and definitions apply.3.1canonical serializa
28、tionserialization providing a one-to-one mapping between the XMP data model and the serialized XML3.2general qualifierXMP qualifier other than xml:lang3.3schemaschema fileformal description of serialized XMP3.4validationprocess of verifying whether serialized XMP follows one or more schemas3.5valida
29、tion enginesoftware tool that performs validation3.6XMPextensible metadata platform, as defined by ISO 16684-1INTERNATIONAL STANDARD ISO 16684-2:2014(E) ISO 2014 All rights reserved 1BS ISO 16684-2:2014ISO 16684-2:2014(E)3.7XMP entityXMP property, array item, structure field, or qualifier4 Conforman
30、ceThis part of ISO 16684 describes methodology to create interoperable software and schema files in order to validate XMP metadata using regular-grammar-based validation schemas defined in ISO/IEC 19757-2 and referred to in this part of ISO 16684 as RELAX NG. Conformance on the part of a software va
31、lidation engine enables the creation of schema files with lower complexity. Conforming validation engines shall adhere to all requirements of ISO 16684-1 and this part of ISO 16684. Conforming validation engines can provide additional features that are not explicitly forbidden by this part of ISO 16
32、684. Conformance on the part of schema files enables their interchange among conforming validation engines. Conforming schema files shall adhere to all requirements of this part of ISO 16684. Conforming schema files can provide additional features that are not explicitly forbidden by this part of IS
33、O 16684.5 Canonical serialization of XMP5.1 GeneralA major difficulty in validating XMP is that the RDF metadata format used by XMP allows multiple XML representations for the same metadata content. For reference, see ISO 16684-1:2012, 7.9. The RELAX NG schema language is used to validate serialized
34、 XML, not the RDF or XMP data models. Writing a RELAX NG schema to cover all possible XML forms for XMP is unacceptably complex. A canonical serialization of XMP is defined to limit this complexity. The canonical serialization requires specific forms of the XMP serialization defined in ISO 16684-1:2
35、012, Clause 7, banning other forms. This provides a one-to-one mapping between the XMP data model and the canonical XML.An XMP validation engine shall produce a canonical serialization of the XMP as part of the validation process. The validation engine shall accept any XMP as input that is allowed u
36、nder ISO 16684-1. This XMP shall be parsed then serialized using the canonical forms described in this Clause. Next, the RELAX NG schema or schemas shall be applied to that canonical serialization. The XMP validation engine shall not modify original files containing the input XMP as part of the vali
37、dation process.5.2 XMP packet serializationThe canonical serialization of XMP shall have an rdf:RDF outermost XML element, which shall contain a single rdf:Description element to contain all XMP properties. That is, properties for all top-level namespaces are within this one rdf:Description element.
38、 The XMP properties shall be grouped by namespace. The namespace groups can have any order.EXAMPLE An XMP metadata packet is shown containing XMP properties of different namespaces in a single rdf:Description element.image/jpeg32012-02-29T12:33:44uuid:example12345.3 Property serializationThe canonic
39、al serialization of XMP shall use the XML element form for XMP properties. The property attribute notation defined in ISO 16684-1:2012, 7.9.2.2 shall not be used.2 ISO 2014 All rights reservedBS ISO 16684-2:2014ISO 16684-2:2014(E)5.4 Structure value serializationThe canonical serialization of XMP sh
40、all use a nested rdf:Description element for structure values. The structure fields shall be serialized as XML elements within that rdf:Description element. Values in a structure can be of type simple, structure, or array. They shall be serialized as described in 6.3, 6.4, and 6.5. The rdf:parseType
41、=”resource” attribute notation defined in ISO 16684-1:2012, 7.9.2.3 shall not be used. The structure field attribute notation defined in ISO 16684-1:2012, 7.9.2.4 shall not be used.EXAMPLE A structure value from an XMP metadata stream is shown in its canonically serialized form.id:documentid:instanc
42、e5.5 Array value serializationThe canonical serialization of XMP shall use a nested rdf:Bag, rdf:Seq, or rdf:Alt element for array values. The array items shall be rdf:li elements within the rdf:Bag, rdf:Seq, or rdf:Alt element.EXAMPLE An array value from an XMP metadata stream is shown in its canon
43、ically serialized form.subject 1subject 25.6 Qualifier serializationThe canonical serialization of XMP shall use the XML syntax defined in ISO 16684-1:2012, 7.8 for qualifiers. An xml:lang qualifier shall be serialized as an xml:lang attribute in the start tag of the XML element whose name is that o
44、f the XMP entity having the xml:lang qualifier. All general qualifiers shall be serialized as XML elements within an rdf:Description element that is within the XML element whose name is that of the XMP entity having the qualifier. The value of that XMP entity shall be within an rdf:value element wit
45、hin that rdf:Description element. The rdf:value element should be the first XML element within that rdf:Description element.The rdf:parseType=”resource” notation defined in ISO 16684-1:2012, 7.9.2.3 shall not be used for an XMP entity with general qualifiers. The field attribute notation defined in
46、ISO 16684-1:2012, 7.9.2.4 shall not be used for an XMP entity with general qualifiers. The RDF TypedNode notation defined in ISO 16684-1:2012, 7.9.2.5 shall not be used for an rdf:type qualifier.EXAMPLE A part from an XMP metadata stream using a qualifier is shown in its canonically serialized form.
47、0-13-110941-3ISBN6 RELAX NG idioms for XMP6.1 GeneralHaving a canonical serialization for XMP is necessary to simplify the creation of RELAX NG schemas. As a consequence, considerably more freedom can be granted in the creation of the RELAX NG schemas. ISO 2014 All rights reserved 3BS ISO 16684-2:20
48、14ISO 16684-2:2014(E)This clause defines idioms for RELAX NG schemas that can improve reuse and interchange. They can also enable improved operation of a validation engine, for example making it easier to provide helpful error messages. Use of these idioms is not required.6.2 ModularizationRELAX NG
49、provides three main forms of modularization, the rng:define element, the rng:grammar element, and the rng:include element. The RELAX NG idioms for XMP provide recommendations for using these elements to simplify the creation of full RELAX NG schemas for XMP and to improve reuse and interchange of schema modules.The rng:define element is perhaps the most important. It provides a means to create a named pattern, typically used to define a specific easily understood aspect of the XML to be validated. Lower level rng:define patterns ca
copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1