• Aucun résultat trouvé

Additional Information on XML Document Creation

Java & XML[27] is a very good information source about creating and manipulatingXML documents in Java. It also shows how to integrate stylesheet processing with Java.

More information on the SAX event model for data conversion intoXML can be found in chapter 7 of [21], an excellent tutorial on Java for XMLprocessing.

Chapter 7 Conclusion

This report has presented some XMLtechniques using a single, simple example in order to give a pedagogical overview of the different approaches to processing XML files. In fact, it was our own way of learning XML so in no way should these techniques be viewed as optimal or definitive. We also made some connections with other computer science techniques because this helped us to learn XML by making links to our previous knowledge.

We have deliberately chosen to ignore many details in order that the main ideas, which are relatively simple, can emerge. XMLprocessing is only starting and much more remains to be done, especially as it is one of the fundamental building block for the Semantic Web initiative [12]. XML is the encoding for upper level languages such as RDF for defining information about documents and for OWL to define ontologies.

Bibliography

[1] Information processing, Text and Office Systems Standard Generalized Markup Lan-guage (SGML). First edition. Technical report, ISO (International Organization for Standardization). ISO 8879:1986(E), 1986.

[2] Document Object Model (DOM) Technical Reports. Technical report, W3C, http:

//www.w3.org/DOM/DOMTR, 2003.

[3] Uniform resource locators. Technical report, W3C,http://www.w3.org/Addressing/

URL/Overview.html, 2003.

[4] Universal Resource Identifiers. Technical report, W3C, http://www.w3.org/

Addressing/URL/URI_Overview.html, 2003.

[5] Portable document format. Technical report, Adobe Corporation, http://partners.

adobe.com/public/developer/pdf/index_reference.html, 2005.

[6] Xml package for python. Technical report,http://pyxml.sourceforge.net/, 2005.

[7] XML4cobol SE. Technical report, ECM Systemintegration, http://xml4cobol.com/, 2005.

[8] Sharon Adler, Anders Berglund, Jeff Caruso, Stephen Deach, Tony Graham, Paul Grosso, Eduardo Gutentag, Alex Milowski, Scott Parnell, Jeremy Richman, and Steve Zilles. Extensible Stylesheet Language (XSL). Technical report, W3C, http:

//www.w3.org/TR/xsl, 2001.

[9] Altova Corp.,http://www.xmlspy.com/.XML Spy 5 Enterprise Edition Manual, 2005.

[10] Apache XML Project. Xerces Java and C++ Parsers. http://xml.apache.org/

#xerces, 2.7.1 edition, 2005.

[11] Anders Berglund, Scott Boag, Don Chamberlin, Mary F. Fern´andez, Michael Kay, Jonathan Robin, and J´erˆome Sim´eon. XML Path Language (XPath) 2.0. Technical report, W3C, http://www.w3.org/TR/xpath20, 2005.

[12] Tim Berners-Lee, James Hendler, and Ora Lassila. The semantic web. Scientific Amer-ican, May 2001.

[13] Paul V. Biron and Ashok Malhotra. XML Schema Part 2: Datatypes. Technical report, W3C, http://www.w3.org/TR/xmlschema-2/, 2004.

[14] Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, and Eve Maler. Extensible Markup Language (XML) 1.0 Tthird Edition). Technical report, W3C, http://www.w3.org/

TR/REC-xml, 2004.

[15] Allen Brown, Matthew Fuchs, Jonathan Robie, and Philip Wadler. XML Schema: Formal Description. Technical report, W3C, http://www.w3.org/TR/

xmlschema-formal/, Sept 2001.

[16] James Clark. XSL Transformations (XSLT). http://www.w3.org/TR/xslt, 1999.

[17] James Clark. Multi-format schema converter based on RELAX NG. Technical report, Thai Open Source Software Center Ltd, http://www.thaiopensource.com/relaxng/

trang.html, 2003.

[18] James Clark. New mode for XML. http://www.thaiopensource.com/nxml-mode/, 2004.

[19] James Clark and Steve DeRose. XML Path Language (XPath). Technical report, W3C, http://www.w3.org/TR/xpath, 1999.

[20] James Clark and Makoto Murata. RELAX NG specification. Technical report, Or-ganization for the Advancement of Structured Information Standards [OASIS], http:

//www.oasis-open.org/committees/relax-ng/spec-20011203.html, 2001.

[21] E. Armstrong et al. The J2EE 1.4 Tutorial for Sun Java System Application Server Platform Edition 8.1 2005Q2. Sun corp., http://java.sun.com/j2ee/1.4/docs/

tutorial/doc/index.html, June 2005.

[22] Benoˆıt Habert. Objectif : CLOS. Objectif. Masson, Paris, 1996.

[23] Cay Horstmann. Big Java. Wiley, 2002.

[24] Dongwon Lee and Wesley W. Chu. Comparative analysis of six XML schema languages.

ACM SIGMOD Record, 29(3):76–87, 2000.

[25] Murali Mani and Dongwon Lee. XML to relational conversion using theory of regular tree grammars. In Proc. VLDB Workshop on Efficiency and Effectiveness of XML Tools, and Techniques (EEXTT), pages 81–103, Hong Kong, China, August 2002.

[26] Jonathan Marsh and David Orchard. XML Inclusions (XInclude) Version 1.0. Technical report, W3C, http://www.w3.org/TR/xinclude/, 2004.

[27] Brett McLaughlin. Java & XML. O’Reilly, 2nd edition, 2001.

[28] W. Scott Means and Elliotte Rusty Harold. XML in a Nutshell. O’Reilly, 2nd edition, 2002.

[29] David Megginson. Official website for SAX. Technical report, Sourceforge, http://

www.saxproject.org/, 2005.

[30] Matt Sergean. XML-Parser-2.34. Technical report, CPAN, http://search.cpan.org/

~msergeant/XML-Parser-2.34/Parser.pm, 2003.

[31] Henry S. Thompson, David Beech, Murray Maloney, and Noah Mendelsohn. XML Schema Part 1: Structures. Technical report, W3C, http://www.w3.org/TR/

xmlschema-1/, 2004.

[32] Henry S. Thompson and Richard Tobin. XML Schema Validator. http://www.ltg.

ed.ac.uk/~{}ht/xsv-status.html, 2002.

[33] Eric van der Vlist. XML Schema. O’Reilly, 2002.

[34] Eric van der Vlist. Relax NG. O’Reilly, http://books.xmlschemata.org/relaxng/, 2004.

[35] Malcom Wallace and Colin Runciman. HaXml. University of York, http://www.cs.

york.ac.uk/fp/HaXml/, 2002.

[36] Sean Wheller. <oXygen/> XML Editor User Guide. SyncRO Soft Ltd, http://www.

oxygenxml.com/doc/ug-standalone-en/index.htm, 2005.

[37] Jan Wielemaker. SWI-Prolog SGML/XML parser. Technical report, University of Amsterdam, http://www.swi-prolog.org/packages/sgml2pl.html, 2005.

Appendix: Some XML Related Technologies and Systems

Abbreviation Full name Sections Specs

DOM Document Object Model 5.1 [2]

DTD Document Type Definition 3.1 [14]

PDF Portable Document Format 4.5 [5]

RELAX NG REgular LAnguage for Xml, New Generation 3.3 [20]

SAX Simple Application programming interface for Xml 5.2 [29]

SGML Standard Generalized Markup Language 1 [1]

URI Uniform Resource Identifier 2.1 [4]

URL Uniform Resource Locator 2.1 [3]

XML eXtended Markup Language * [14]

XML Schema XML Schema 3.2 [31, 13]

XPath Xml PATH language 4.1 [19]

XSL eXtensible Stylesheet Language 4.2 [8]

XSLT XSL Transformations 4.2 [16]

Quick Reference Tables

Quick reference tables that are taken from previous chapters. Names in italics refer to other elements. Regular expressions are used to describe the allowed forms: braces are used for grouping, ? indicates that the preceding grouping is optional, * that it can be repeated as often as necessary possibly none and + that it must be appear at least once.

DTD

<!DOCTYPE rootElement SYSTEM ”file.dtd”{[ !ENTITY*]}? >

<!ELEMENT NCName ({#PCDATA |}? regexpOf !ELEMENT ) >

<!ELEMENT NCName (#PCDATA)>

<!ELEMENT NCName EMPTY >

<!ATTLIST elementNCName attributeNCName declValue default>

declValue = CDATA | ID| IDREF | (CNAME {|CNAME}+ ) default ={#REQUIRED | #IMPLIED}

<![CDATA[ ... ]]>

<!ENTITY name ” ... ”>

<!ENTITY % name ” ... ”>

<!ENTITY name SYSTEM ”file.xml”>

Table 3.1, Section: 3.1, Page 22

XML Schema

RELAX NG

Compact Syntax (RNC) XMLsyntax (RNG)

{default? namespace id =URI <grammar>

| datatypesid = URI }* {<start>pattern</start>

{ start =pattern | <define name=”NCName”> pattern+ </define> }*

| id = pattern }* </grammar>

element QName {{ pattern }} <element name=”QName”>pattern+</element>

attribute QName {{pattern }} <attribute name=”QName”>pattern+ </attribute>

pattern { , pattern }+ <group name=”QName”>pattern+ </group>

pattern { &pattern }+ <interleave name=”QName”> pattern+</interleave>

pattern { | pattern }+ <choice name=”QName”> pattern+</choice>

pattern ? <optional name=”QName”>pattern+ </optional>

pattern * <zeroOrMore name=”QName”>pattern+</zeroOrMore>

pattern + <oneOrMore name=”QName”>pattern+ </oneOrMore>

mixed {{pattern }} <mixed name=”QName”> pattern+ </mixed>

id <ref name=”NCName”/>

empty <empty/>

text <text/>

dataTypeValue <value{ name=”NCName”}?> string </value>

dataTypeName {{ {id =value}* }} <data{ type=”NCName”}?>

{<param name=”NCName”>string</param>}*

</data>

Table 3.3, Section: 3.3, Page 43

XSLT

{xsl:apply-templates | xsl:call-template | xsl:variable | xsl:attribute |xsl:element}*

</xsl:template>

<xsl:templatename=”QName”>

xsl:param*

{xsl:apply-templates | xsl:call-template | xsl:variable | xsl:attribute |xsl:element}*

</xsl:template>

Index

schema association, 53–54 simple type, 37

stylesheet, 55–90

stylesheet association, 89 template, 59

template named, 59

Trang schema converter, 44 transformation, 55–90 tree, 11

uniqueness constaints, 39 validation, 21–54

well-formed, 14 XPath, 56–59 XSL, 55–90 XSL predicate, 57

XSL transformations, 59–89 XSL-FO, 80–89

Documents relatifs