IPTC News Exchange Formats Working Party Autumn 2012
-
Upload
stuart-myles -
Category
Documents
-
view
877 -
download
5
description
Transcript of IPTC News Exchange Formats Working Party Autumn 2012
News Exchange Formats WPIPTC Autumn Meeting 2012
MoscowStuart Myles, Associated Press
© 2009 IPTC (www.iptc.org) All rights reserved 2
Agenda• Minutes of the previous meeting
• Matters arising from the minutes
• NewsML-G2 2.13
• Annual Public Release of NewsML-G2 2.12
• QCodes
• News in JSON
• Date & place of the next meeting
© 2009 IPTC (www.iptc.org) All rights reserved 3
Previous NEF WP Meeting
• Held: 11th June 2012, New York, USA• Minutes
– already circulated in the post-conference package– URN: urn:iptc:workdoc:nef:1204:1– Doc: NEF1204.1-AGMminutes.pdf– Actions arising from the minutes
Vote to approve the minutes
Action Due date StatusInvestigate a JSON representation of NewsML-G2 as format for API responses Autumn 2012
Add G2-format receivers to the Who's Using It web pages Autumn 2012
© 2009 IPTC (www.iptc.org) All rights reserved 4
Chairman’s report
• Other Actions from previous NEF WP Meetings
– Add G2-format receivers to the Who's Using It web pages• Major Agencies to ask their customers if they can be added to the
Users list on the website• Status: Still outstanding – to follow up
– Marketing• Elaborate on a unifying marketing strategy for the G2-Standards• Status: Still outstanding – to follow up
© 2009 IPTC (www.iptc.org) All rights reserved 5
NewsML-G2 2.13 Changes
• CR00158: Add value format to altId
• CR00159: Add colourdepth to News Content Characteristics
© 2009 IPTC (www.iptc.org) All rights reserved 6
CR00158: Add a value format attribute to altId
Add @idformat to the altId element to indicate the format of the value of the element
http://dev.iptc.org/G2-CR00158-Add-value-format-to-altId
Example altId elements with the new @idformat
<altId idformat="valfmt:qcode">p:123</altId><altId idformat="valfmt:uri">http://example.com/ids/123</altId><altId idformat="valfmt:literal">123</altId>
Create a new Value Format NewsCodes controlled vocabulary
The recommended scheme alias is "valfmt"– qcode: a QCode as defined by the G2 specifications– uri: a URI as defined by RFC3986 or an IRI as defined by RFC3987– literal: a literal string
http://cv.iptc.org/newscodes/valueformat/
© 2009 IPTC (www.iptc.org) All rights reserved 7
CR00159: Add colourdepth
Add @colourdepth to the News Content Characteristics attribute group
http://dev.iptc.org/G2-CR00159-Add-colourdepth-to-News-Content-Characteristics
<remoteContent residref="tag:example.org,2012:video_example.mpg" rendition="rnd:highRes" contenttype="video/mpeg" format="fmt:mpeg" height="625" duration="334" audiocodec="codec:mpegLayer2" audiobitrate="256000" audiosamplesize="16" audiosamplerate="48000" videocodec="codec:mpeg2mp@ml" videoavgbitrate="6500000" videoframerate="25.0" videoscan="interlaced" videoaspectratio="16:9" videosampling="4:2:0" colourdepth="8" rtr:definition="videoDef:SD">
Colourdepth is the "bit depth defining the spread of colour data within each sample".
The colourdepth is relevant to still images, graphics and video.
See http://en.wikipedia.org/wiki/Color_depth for more background
© 2009 IPTC (www.iptc.org) All rights reserved 8
NewsML-G2
MOTION – Standards Committee
MOTION (to the Standards Committee): To approve NewsML-G2 version 2.13
as specified by the documents in
20121001-DRAFT-NewsML-G2_2.13.zip
as a Developer Release.
NewsML-G2 2.12
NewsML-G2 2.12 is the current Public Releasehttp://www.iptc.org/site/News_Exchange_Formats/NewsML-G2/
http://www.iptc.org/std/NewsML-G2/2.12/
The 2.12 G2 XSDhttp://www.iptc.org/std/NewsML-G2/2.12/specification/
The updated G2 Implementation Guidehttp://www.iptc.org/std/NewsML-G2/2.12/documentation/
© 2010 IPTC (www.iptc.org) All rights reserved 9
QCodes
• As part of the IPTC mission of creating better and more comprehensive documentation, we have a new set of pages on the "dev" site, dedicated to QCodes
• http://dev.iptc.org/QCodes
• QCodes (Qualified Codes) are a short format for URIs• They are used extensively within the G2 family• They avoid certain restrictions from QNames• Please review the documentation, so that we can publish
it publicly
© 2010 IPTC (www.iptc.org) All rights reserved 10
© 2010 IPTC (www.iptc.org) All rights reserved 11
News about Jayson?
News in JSON
The IPTC should standardize the representation of news in JSON
• JSON = JavaScript Object Notation http://json.org/
• Lightweight, easy to parse, data interchange format
• "JSON is a better data exchange format. XML is a better document exchange format. Use the right tool for the right job.”http://www.json.org/xml.html
© 2010 IPTC (www.iptc.org) All rights reserved 12
JSON and XML
• JSON is an increasingly popular alternative to / replacement for XML, e.g. for APIs– http://
blog.appfog.com/why-json-will-continue-to-push-xml-out-of-the-picture/
– http://blog.programmableweb.com/2011/05/25/1-in-5-apis-say-bye-xml/
• XML community starting to embrace JSON– http://www.slideshare.net/JeniT/collisions-chimera-and-consona
nce-in-web-content– http://www.balisage.net/Proceedings/topics/JSON.html
© 2010 IPTC (www.iptc.org) All rights reserved 13
What is JSON?Name / value pairs: a fieldname in quotes, a colon, a value in quotes
"givenname" : "Stuart"
Objects: written inside curly braces, may contain multiple NVPs
{"givenname" : "Stuart", "familyname" : "Myles"}
Arrays: Written inside square braces, may contain multiple objects{"iptcdelegates": [ { "givenname": "Dave", "familyname": "Compton"}, { "givenname": "Stuart", "familyname": "Myles"}, { "givenname": "Robert", "familyname": "Schmidt-Nia" }]}
© 2010 IPTC (www.iptc.org) All rights reserved 14
Mapping between JSON and XML
• Some challenges– No direct equivalent to namespaces in JSON– No direct equivalent to attributes in JSON– Best way to handle repeated elements?– Representing text markup (particularly with inline markup)– Different datatypes in JSON and XML
• Two basic approaches:– Mechanically translate from XML to JSON– Handcraft representation in JSON
• My recommendation is that IPTC hand crafts the JSON– Maximize the “naturalness” of resulting markup– Lets us determine the underlying model (G2, rNews, NITF, ...)
© 2010 IPTC (www.iptc.org) All rights reserved 15
An Initial G2 JSON Experiment
Tried JSON w/ TR G2 item
https://gist.github.com/3880441
Also see AP’s JSON API
http://developer.ap.org/capi
© 2010 IPTC (www.iptc.org) All rights reserved 16
JSON Schema, Validation
• Support for formal validation of JSON is starting to be developed– JSON schema initiative
• http://json-schema.org/• http://www.jsonschema.net/
– JSON validation• http://jsonlint.com/
• IPTC could develop a JSON schema for news
© 2010 IPTC (www.iptc.org) All rights reserved 17
Proposal
The IPTC should standardize the representation of news in JSON
• News Exchange Formats group kick off News in JSON– Focus on “sweet spots” for JSON representation
• APIs and data interchange more than documents– Form a group
• Volunteers, charter, establish working methods...– Establish an agenda, such as
• Examine existing JSON work• Poll IPTC membership for interest• Determine the data model which needs to be expressed (G2,
rNews, NITF ...)• Create experimental JSON representations and schema
• Progress report in Amsterdam
© 2010 IPTC (www.iptc.org) All rights reserved 18
© 2009 IPTC (www.iptc.org) All rights reserved 19
Any other business?
© 2009 IPTC (www.iptc.org) All rights reserved 20
Date & Place of the Next Meeting
IPTC Spring
11 – 13 March 2013
Amsterdam, Nederland
Спасибо и до свидания!