~ubuntu-branches/debian/wheezy/jing-trang/wheezy

« back to all changes in this revision

Viewing changes to datatype-sample/index.html

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Thibault
  • Date: 2009-09-01 15:53:03 UTC
  • Revision ID: james.westby@ubuntu.com-20090901155303-2kweef05h5v9j3ni
Tags: upstream-20090818
ImportĀ upstreamĀ versionĀ 20090818

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html xmlns="http://www.w3.org/1999/xhtml">
 
2
<head>
 
3
<title>RELAX NG Pluggable Datatype Library Example</title>
 
4
</head>
 
5
<body>
 
6
 
 
7
<h1>RELAX NG Pluggable Datatype Library Example</h1>
 
8
 
 
9
<p>This package contains a very simple example of a <a
 
10
href="../doc/pluggable-datatypes.html">pluggable datatype library</a>.
 
11
The datatype library is implemented by the class
 
12
<code>com.thaiopensource.datatype.sample.BalancedString</code>.  The
 
13
bulk of the implementation is inherited from the abstract class
 
14
<code>com.thaiopensource.datatype.sample.SimpleDatatypeLibrary</code>,
 
15
which provides default implementations for the methods in the
 
16
interfaces which a datatype library must implement.  A class that
 
17
derives from <code>SimpleDatatypeLibrary</code> has only to implement
 
18
a <code>boolean isValid(String literal)</code> method.  The datatype
 
19
library has the URI
 
20
<code>http://www.thaiopensource.com/relaxng/datatypes/sample</code>,
 
21
and contains exactly one datatype, which is called
 
22
<code>balancedString</code>.  This datatype allows any string in which
 
23
parentheses are properly balanced (nested). To use this sample
 
24
datatype library, simply include <code>datatype-sample.jar</code> in
 
25
your CLASSPATH.  You will then be able to validate against schemas
 
26
using this additional datatype.  The file <a
 
27
href="datatype-sample.rng">datatype-sample.rng</a> is a simple RELAX
 
28
NG schema using this datatype; <a href="valid.xml">valid.xml</a> is an
 
29
instance that is valid with respect to this schema; <a
 
30
href="invalid.xml">invalid.xml</a> is an instance that is not valid
 
31
with respect to this schema.</p>
 
32
 
 
33
<address>
 
34
<a href="mailto:jjc@jclark.com">James Clark</a>
 
35
</address>
 
36
</body>
 
37
</html>