Top Banner
Can schemas help SVG i nterwork with other ma rkup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events
30

Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

Dec 14, 2015

Download

Documents

Zaria Nickols
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

Can schemas help SVG interwork with other markup vocabularies?

MURATA Makoto (FAMILY Given)

International University of Japan

XHTMLXForms

SVGXML Events

Page 2: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

Markup vocabularies mentioned in SVG specs XHTML MathML sXBL (formerly RCC) XForms XML Events SMIL XLink RDF user-defined vocabularies

Page 3: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

An example: XHTML + SVG + MathML

Page 4: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

XML source<?xml version="1.0"?><html xmlns="http://www.w3.org/1999/xhtml"> <head>

<title>Complex Compound Document</title> <style xml:space="preserve">div.attention{ font-size:small;color:red; } div.mathml_graph {background:white;border:gray solid 1px;float:right; width:5cm;margin:5px;text-align:center;} div.mathml_main {margin:50px}</style>

</head> <body bgcolor="#EEF">

<h1>Complex Compound Document</h1> <p>Various Vocabularies are packed in XHTML.</p> <table border="1" width="80%" align="center" style="background:#CFC">

<tr> <td>SVG</td> <td style="padding:5px;background:white">

<svg width="4cm" height="4cm" viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg">

<path d="M 139.41666,24.729164 L 212.41666,250.72916 L 20.416656,110.729164 L 258.41666,110.729164 L 66.41666,250.72916 L 139.41666,24.729164" style="fill-rule:nonzero; fill:red; stroke:black; stroke-width:3" />

<path d="M 257.9375,130.5625 L 330.9375,356.5625 L 138.9375,216.5625 L 376.9375,216.5625 L 184.9375,356.5625 L 257.9375,130.5625" style="fill-rule:evenodd; fill:red; stroke:black; stroke-width:3" />

</svg> </td>

</tr>

Page 5: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

SVG and sXBL<svg:svg xmlns:svg="http://www.w3.org/2000/svg" version="1.2" xmlns:xbl="http://www.w3.org/2004/xbl"> <svg:defs> <xbl:xbl> <xbl:definition element="red"> <xbl:template> <svg:text fill="red"><xbl:content/></svg:text> </xbl:template> </xbl:definition> </xbl:xbl> </svg:defs>

<red> Red text. </red>

</svg:svg>

Page 6: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

Schemas and Schema Languages Schemas

A formal description of the syntax of a markup vocabulary

Schema languages DTD W3C XML Schema RELAX NG

Page 7: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

Three reasons for using schemas To provide rigorous, concise, and

human-readable description of a markup vocabulary.

To determine whether an XML document is indeed written in that markup vocabulary [validation ].

To easily build application programs dedicated to that markup vocabulary [data binding ].

Page 8: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

Schemas for non-monolithic documents We have an RNG schema for SVG2. We have an RNG schema for sXBL. Then, is it easy to create a schema for t

he combination of SVG2 and sXBL? Not really XHTML2 + XForms+ SVG + XML Events + s

XBL + SMIL is hoplessly difficult.

Page 9: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

Nobody knows everything.

SVG

XForms

XHTML2

sXBL

Page 10: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

Requirements on validation#1 It should be possible to combine

schemas representing vocabularies easily.

It should be possible to divide non-monolithic documents into pieces and then validate each piece against one of the schemas. (divide-and-validate)

Page 11: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

Do existing schema languages meet these requirements? No, you have to understand all

schemas very well and change them.

No, you have to validate the entire document against the combination of all schemas.

W3C XML Schema RELAX NG

Page 12: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

Requirements on validation#2 It should be possible to use different sc

hema languages for different vocabularies

Validators for many schema languages should work together.

Page 13: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

Do existing schema languages meet these requirements? No, you are forced to use one schema la

nguage No, you have to use one validator.

W3C XML Schema RELAX NG

Page 14: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

Namespace-based Validation Dispatching Language

ISO/IEC JTC1 SC34 CD 19757-4

Page 15: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

Idea Schema authoring by combining subschemas

Each subschema is concerned with one (or a few) namespaces.

Different subschemas may be written in different schema languages.

Validation (Divide-and-validate) Divide a non-monolithic document into validation c

andidates. Different validation candidates are dispatched to di

fferent validators.

Page 16: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

Syntax Simply put,

(namespace, schema) pairs

Page 17: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

Processing model

schema

Non-monolithic document

Validation candidate

validator

DSDL-NVDL engine

DSDL-NVDL schema

Page 18: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

Dividing non-monolithic documents into pieces

Page 19: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

Implementation overview

Validator 1

Validator 2

Validator 3

SAX events

NVDL engine

Page 20: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

SVG and sXBL<svg:svg xmlns:svg="http://www.w3.org/2000/svg" version="1.2" xmlns:xbl="http://www.w3.org/2004/xbl"> <svg:defs> <xbl:xbl> <xbl:definition element="red"> <xbl:template> <svg:text fill="red"><xbl:content/> </svg:text> </xbl:template> </xbl:definition> </xbl:xbl> </svg:defs>

<red> Red text. </red>

</svg:svg>

Page 21: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

SVG only<svg:svg xmlns:svg="http://www.w3.org/2000/svg" version="1.2" xmlns:xbl="http://www.w3.org/2004/xbl"> <svg:defs> <xbl:xbl> <xbl:definition element="red"> <xbl:template> <svg:text fill="red"><xbl:content/> </svg:text> </xbl:template> </xbl:definition> </xbl:xbl> </svg:defs>

<red> Red text. </red>

</svg:svg>

Page 22: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

sXBL only<svg:svg xmlns:svg="http://www.w3.org/2000/svg" version="1.2" xmlns:xbl="http://www.w3.org/2004/xbl"> <svg:defs> <xbl:xbl> <xbl:definition element="red"> <xbl:template> <svg:text fill="red"><xbl:content/> </svg:text> </xbl:template> </xbl:definition> </xbl:xbl> </svg:defs>

<red> Red text. </red>

</svg:svg>

Page 23: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

User-defined vocabulary only<svg:svg xmlns:svg="http://www.w3.org/2000/svg" version="1.2" xmlns:xbl="http://www.w3.org/2004/xbl"> <svg:defs> <xbl:xbl> <xbl:definition element="red"> <xbl:template> <svg:text fill="red"><xbl:content/> </svg:text> </xbl:template> </xbl:definition> </xbl:xbl> </svg:defs>

<red> Red text. </red>

</svg:svg>

Page 24: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

Standardization

Page 25: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

ISO/IEC JTC1 SC34 SGML Topic Map RELAX NG Schematron

Page 26: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

Document Schema Definition Languages1. Overview2. Regular-grammar-based validation -- RELAX NG3. Rule-based validation -- Schematron4. Namespace-based Validation Dispatching Language

-- NVDL5. Datatypes6. Path-based integrity constraints7. Character repertoire validation8. Declarative document architecture9. Datatype- and namespace-aware DTDs10. Validation management

Page 27: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

History RELAX Namespace(2001)

JIS Technical Report ISO/IEC JTC1 Draft Technical Report

DSDL Part 4 Committee Draft (2002) Modular Namespaces by James Clark (2003) Namespace Switchboard by Rick Jelliffe (2003) Namespace Routing Language by James Clark

(2003) DSDL Part 4 Second Committee Draft (2004)

Page 28: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

Plan Final Committee Draft (2004?) Final Draft International Standard

(2005?) International Standard (2005?)

Page 29: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

Conclusion and Future Work If the namespace recommendation

is the first step, NVDL is the second step for the non-monolithic WWW.

Data binding for NVDL is strongly required.

Page 30: Can schemas help SVG interwork with other markup vocabularies? MURATA Makoto (FAMILY Given) International University of Japan XHTML XForms SVG XML Events.

Links NRL by James Clark

http://www.thaiopensource.com/relaxng/nrl.html

2nd CD for NVDL http://www.asahi-net.or.jp/~eb2m-mrt/dsd

l/