--- a/Data/Documents/torture_test.xml dim. juin 05 23:51:15 2011 +0200
+++ b/Data/Documents/torture_test.xml lun. juin 06 21:51:00 2011 +0200
@@ -63,6 +63,31 @@
</parag>
</section>
</topic>
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <topic>
+ <metadata>
+ <title>Cyrano de Bergerac</title>
+ <subtitle>Extrait</subtitle>
+ </metadata>
+ <section>
+ <speech>
+ <speaker>Le fâcheux</speaker>
+ <parag>
+ Quoi, pas un grand seigneur pour couvrir de son nom ?…
+ </parag>
+ </speech>
+ <speech>
+ <speaker>Cyrano</speaker>
+ <stage>agacé</stage>
+ <parag>
+ Non, ai-je dit deux fois. Faut-il donc que je trisse ?…
+ </parag>
+ <parag>
+ Non, pas de protecteur…mais une protectrice !
+ </parag>
+ </speech>
+ </section>
+ </topic>
</division>
</document>
</publidoc>
--- /dev/null jeu. janv. 01 00:00:00 1970 +0000
+++ b/Documentation/Makefile lun. juin 06 21:51:00 2011 +0200
@@ -0,0 +1,130 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+PAPER =
+BUILDDIR = build
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
+
+help:
+ @echo "Please use \`make <target>' where <target> is one of"
+ @echo " html to make standalone HTML files"
+ @echo " dirhtml to make HTML files named index.html in directories"
+ @echo " singlehtml to make a single large HTML file"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
+ @echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " qthelp to make HTML files and a qthelp project"
+ @echo " devhelp to make HTML files and a Devhelp project"
+ @echo " epub to make an epub"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " latexpdf to make LaTeX files and run them through pdflatex"
+ @echo " text to make text files"
+ @echo " man to make manual pages"
+ @echo " changes to make an overview of all changed/added/deprecated items"
+ @echo " linkcheck to check all external links for integrity"
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+ -rm -rf $(BUILDDIR)/*
+
+html:
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+ $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+ @echo
+ @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+ @echo
+ @echo "Build finished; now you can process the pickle files."
+
+json:
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+ @echo
+ @echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+ @echo
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+ @echo
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Publidoc.qhcp"
+ @echo "To view the help file:"
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Publidoc.qhc"
+
+devhelp:
+ $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+ @echo
+ @echo "Build finished."
+ @echo "To view the help file:"
+ @echo "# mkdir -p $$HOME/.local/share/devhelp/Publidoc"
+ @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Publidoc"
+ @echo "# devhelp"
+
+epub:
+ $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+ @echo
+ @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+ @echo "Run \`make' in that directory to run these through (pdf)latex" \
+ "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo "Running LaTeX files through pdflatex..."
+ make -C $(BUILDDIR)/latex all-pdf
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+ $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+ @echo
+ @echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+ $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+ @echo
+ @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+changes:
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+ @echo
+ @echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+ @echo
+ @echo "Link check complete; look for any errors in the above output " \
+ "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+ @echo "Testing of doctests in the sources finished, look at the " \
+ "results in $(BUILDDIR)/doctest/output.txt."
--- /dev/null jeu. janv. 01 00:00:00 1970 +0000
+++ b/Documentation/source/conf.py lun. juin 06 21:51:00 2011 +0200
@@ -0,0 +1,264 @@
+# -*- coding: utf-8 -*-
+#
+# Publidoc documentation build configuration file, created by
+# sphinx-quickstart on Mon Jun 6 08:40:53 2011.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration -----------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+#extensions = ['sphinx.ext.pngmath']
+
+# Add any paths that contain templates here, relative to this directory.
+#templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'Publidoc'
+copyright = u'2011, Prismallia'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '1.0'
+# The full version, including alpha/beta/rc tags.
+release = '1.0'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+language = 'fr'
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = []
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+html_theme_options = {
+ 'footerbgcolor': '#4C4C4C',
+ 'sidebarbgcolor': '#DDDDCC',
+ 'sidebartextcolor': '#4F4F4F',
+ 'sidebarlinkcolor': '#333399',
+ 'relbarbgcolor': '#993333',
+}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents. If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar. Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+#html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it. The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'PublidocDoc'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+ ('index', 'publidoc.tex', u'Publidoc Documentation',
+ u'Prismallia', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output --------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+ ('index', 'publidoc', u'Publidoc Documentation',
+ [u'Prismallia'], 1)
+]
+
+
+# -- Options for Epub output ---------------------------------------------------
+
+# Bibliographic Dublin Core info.
+epub_title = u'Publidoc'
+epub_author = u'Patrick PIERRE'
+epub_publisher = u'Prismallia'
+epub_copyright = u'2011, Prismallia'
+
+# The language of the text. It defaults to the language option
+# or en if the language is not set.
+#epub_language = ''
+
+# The scheme of the identifier. Typical schemes are ISBN or URL.
+#epub_scheme = ''
+
+# The unique identifier of the text. This can be a ISBN number
+# or the project homepage.
+#epub_identifier = ''
+
+# A unique identification for the text.
+#epub_uid = ''
+
+# HTML files that should be inserted before the pages created by sphinx.
+# The format is a list of tuples containing the path and title.
+#epub_pre_files = []
+
+# HTML files shat should be inserted after the pages created by sphinx.
+# The format is a list of tuples containing the path and title.
+#epub_post_files = []
+
+# A list of files that should not be packed into the epub file.
+#epub_exclude_files = []
+
+# The depth of the table of contents in toc.ncx.
+#epub_tocdepth = 3
+
+# Allow duplicate toc entries.
+#epub_tocdup = True
--- /dev/null jeu. janv. 01 00:00:00 1970 +0000
+++ b/Documentation/source/index.rst lun. juin 06 21:51:00 2011 +0200
@@ -0,0 +1,33 @@
+.. $Id$
+.. Publidoc documentation master file
+
+Documentation Publidoc & Publiset
+=================================
+
+``publidoc`` est un schéma défini en Relax NG permetant de définir des
+documents complets ou des parties de document à assembler.
+
+``publiset`` est un schéma défini en Relax NG servant à assembler des documents
+XML. Il est tout particulièrement adapté aux documents ``publidoc`` mais peut
+être utilisé pour toutes sortes de schéma.
+
+Ces shémas ont été initialement créés par l'équipe `Prismallia
+<http://www.prismallia.fr>`.
+
+:Latest version: |release|
+
+Table des matières:
+-------------------
+
+.. toctree::
+ :maxdepth: 2
+
+ publidoc
+ publiset
+
+Index et tables
+---------------
+
+* :ref:`genindex`
+* :ref:`search`
+
--- /dev/null jeu. janv. 01 00:00:00 1970 +0000
+++ b/Documentation/source/publidoc.rst lun. juin 06 21:51:00 2011 +0200
@@ -0,0 +1,75 @@
+.. $Id$
+
+Publidoc
+========
+
+``publidoc`` est un schéma défini en Relax NG permetant de définir des
+documents complets ou des parties de document à assembler.
+
+.. ============================================================================
+
+La structure générale d'un document ``publidoc``
+------------------------------------------------
+
+
+.. ============================================================================
+
+Les éléments de haut niveau
+---------------------------
+
+``document``
+ Un document le plus complet possible en ``publidoc``.
+
+``topic``
+ Un texte élémentaire. Il peut être utilisé tel quel ou assemblé avec
+ d'autres.
+
+.. ============================================================================
+
+Les éléments de niveau bloc
+---------------------------
+
+``parag``
+ Un paragraphe
+
+``media``
+ L'appel d'un media (image, vidéo ou son) avec sa légende.
+
+``speech``
+
+.. ============================================================================
+
+Les éléments de niveau courant
+------------------------------
+
+``sup``
+ Exposant.
+
+``sub``
+ Indice.
+
+``romannum``
+ Chiffre romain.
+
+``date``
+ date.
+
+``name``
+ Nom. L'attribut ``of`` permet de préciser la nature du nom.
+
+``note``
+ Note. L'attribut ``label`` permet de préciser la chaîne d'appel. Par
+ défaut, les notes sont numérotées.
+
+``foreign``
+ Mot étranger.
+
+``highlight``
+ Expression mise en valeur.
+
+``term``
+ Terme technique.
+
+``mentioned``
+ Expression mentionnée pour elle même.
+
--- /dev/null jeu. janv. 01 00:00:00 1970 +0000
+++ b/Documentation/source/publiset.rst lun. juin 06 21:51:00 2011 +0200
@@ -0,0 +1,20 @@
+.. $Id$
+
+Publiset
+========
+
+``publiset`` est un schéma défini en Relax NG servant à assembler des documents
+XML. Il est tout particulièrement adapté aux documents ``publidoc`` mais peut
+être utilisé pour toutes sortes de schéma.
+
+.. ============================================================================
+
+La structure générale d'un fichier ``publiset``
+-----------------------------------------------
+
+
+.. ============================================================================
+
+Les éléments de haut niveau
+---------------------------
+
--- a/RelaxNG/publidoc.rnc dim. juin 05 23:51:15 2011 +0200
+++ b/RelaxNG/publidoc.rnc lun. juin 06 21:51:00 2011 +0200
@@ -69,16 +69,28 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ author, publisher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~ author
author = element author { author.content }
author.content =
firstname?,
lastname
+# ~~~~~~ publisher
publisher = element publisher { publisher.content }
publisher.content = inlines
+# ~~~~~~ firstname
+firstname = element firstname { firstname.content }
+
+firstname.content = inlines
+
+# ~~~~~~ lastname
+lastname = element lastname { lastname.content }
+
+lastname.content = inlines
+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
language = element language { language.attributes }
@@ -134,7 +146,7 @@
subject.id.attribute
subject.id.attribute = attribute id { xsd:NMTOKEN }
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
abstract = element abstract { abstract.content }
@@ -194,7 +206,7 @@
section.content =
metadata?,
(section+
- | (parag | media)+)
+ | (parag | media | speech)+)
section.attributes =
status.attribute?
@@ -245,6 +257,27 @@
copyright.content = inlines
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# ~~~~~~ speech
+speech = element speech { speech.content }
+
+speech.content =
+ speaker?,
+ stage?,
+ parag+
+
+# ~~~~~~ speaker
+speaker = element speaker { speaker.content }
+
+speaker.content = inlines
+
+# ~~~~~~ stage
+stage = element stage { stage.content }
+
+stage.content = inlines
+
+
# =============================================================================
# Inline level
# =============================================================================
@@ -257,9 +290,12 @@
& romannum*
& date*
& name*
- & footnote*
+ & note*
& foreign*
& highlight*
+ & term*
+ & mentioned*
+ & quote*
}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub, sup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -277,7 +313,7 @@
date = element date { date.attributes, date.content }
date.attributes =
- date.of.attribute
+ date.of.attribute?
date.of.attribute = attribute of { date.of.enumeration }
date.of.enumeration = "event" | "birth" | "death"
@@ -285,10 +321,6 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-firstname = element firstname { inlines }
-
-lastname = element lastname { inlines }
-
name = element name { name.attributes, name.content }
name.attributes =
@@ -298,15 +330,15 @@
name.content = inlines
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ footnote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-footnote = element footnote { footnote.attributes, footnote.content }
+note = element note { note.attributes, note.content }
-footnote.attributes =
- footnote.label.attribute?
-footnote.label.attribute = attribute label { text }
+note.attributes =
+ note.label.attribute?
+note.label.attribute = attribute label { text }
-footnote.content =
+note.content =
parag+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -323,6 +355,24 @@
highlight.content = inlines
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+term = element term { term.content }
+
+term.content = inlines
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mentioned ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+mentioned = element mentioned { mentioned.content }
+
+mentioned.content = inlines
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+quote = element quote { quote.content }
+
+quote.content = inlines
+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
link = element link { link.attributes, link.content }
--- a/RelaxNG/publidoc.rng dim. juin 05 23:51:15 2011 +0200
+++ b/RelaxNG/publidoc.rng lun. juin 06 21:51:00 2011 +0200
@@ -125,6 +125,7 @@
</element>
</define>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ author, publisher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <!-- ~~~~~~ author -->
<define name="author">
<element name="author">
<ref name="author.content"/>
@@ -136,6 +137,7 @@
</optional>
<ref name="lastname"/>
</define>
+ <!-- ~~~~~~ publisher -->
<define name="publisher">
<element name="publisher">
<ref name="publisher.content"/>
@@ -144,6 +146,24 @@
<define name="publisher.content">
<ref name="inlines"/>
</define>
+ <!-- ~~~~~~ firstname -->
+ <define name="firstname">
+ <element name="firstname">
+ <ref name="firstname.content"/>
+ </element>
+ </define>
+ <define name="firstname.content">
+ <ref name="inlines"/>
+ </define>
+ <!-- ~~~~~~ lastname -->
+ <define name="lastname">
+ <element name="lastname">
+ <ref name="lastname.content"/>
+ </element>
+ </define>
+ <define name="lastname.content">
+ <ref name="inlines"/>
+ </define>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<define name="language">
<element name="language">
@@ -248,7 +268,7 @@
<data type="NMTOKEN"/>
</attribute>
</define>
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<define name="abstract">
<element name="abstract">
<ref name="abstract.content"/>
@@ -364,6 +384,7 @@
<choice>
<ref name="parag"/>
<ref name="media"/>
+ <ref name="speech"/>
</choice>
</oneOrMore>
</choice>
@@ -452,6 +473,42 @@
<define name="copyright.content">
<ref name="inlines"/>
</define>
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <!-- ~~~~~~ speech -->
+ <define name="speech">
+ <element name="speech">
+ <ref name="speech.content"/>
+ </element>
+ </define>
+ <define name="speech.content">
+ <optional>
+ <ref name="speaker"/>
+ </optional>
+ <optional>
+ <ref name="stage"/>
+ </optional>
+ <oneOrMore>
+ <ref name="parag"/>
+ </oneOrMore>
+ </define>
+ <!-- ~~~~~~ speaker -->
+ <define name="speaker">
+ <element name="speaker">
+ <ref name="speaker.content"/>
+ </element>
+ </define>
+ <define name="speaker.content">
+ <ref name="inlines"/>
+ </define>
+ <!-- ~~~~~~ stage -->
+ <define name="stage">
+ <element name="stage">
+ <ref name="stage.content"/>
+ </element>
+ </define>
+ <define name="stage.content">
+ <ref name="inlines"/>
+ </define>
<!--
=============================================================================
Inline level
@@ -477,7 +534,7 @@
<ref name="name"/>
</zeroOrMore>
<zeroOrMore>
- <ref name="footnote"/>
+ <ref name="note"/>
</zeroOrMore>
<zeroOrMore>
<ref name="foreign"/>
@@ -485,6 +542,15 @@
<zeroOrMore>
<ref name="highlight"/>
</zeroOrMore>
+ <zeroOrMore>
+ <ref name="term"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="mentioned"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="quote"/>
+ </zeroOrMore>
</interleave>
</mixed>
</define>
@@ -515,7 +581,9 @@
</element>
</define>
<define name="date.attributes">
- <ref name="date.of.attribute"/>
+ <optional>
+ <ref name="date.of.attribute"/>
+ </optional>
</define>
<define name="date.of.attribute">
<attribute name="of">
@@ -537,16 +605,6 @@
</choice>
</define>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
- <define name="firstname">
- <element name="firstname">
- <ref name="inlines"/>
- </element>
- </define>
- <define name="lastname">
- <element name="lastname">
- <ref name="inlines"/>
- </element>
- </define>
<define name="name">
<element name="name">
<ref name="name.attributes"/>
@@ -575,22 +633,22 @@
<define name="name.content">
<ref name="inlines"/>
</define>
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ footnote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
- <define name="footnote">
- <element name="footnote">
- <ref name="footnote.attributes"/>
- <ref name="footnote.content"/>
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <define name="note">
+ <element name="note">
+ <ref name="note.attributes"/>
+ <ref name="note.content"/>
</element>
</define>
- <define name="footnote.attributes">
+ <define name="note.attributes">
<optional>
- <ref name="footnote.label.attribute"/>
+ <ref name="note.label.attribute"/>
</optional>
</define>
- <define name="footnote.label.attribute">
+ <define name="note.label.attribute">
<attribute name="label"/>
</define>
- <define name="footnote.content">
+ <define name="note.content">
<oneOrMore>
<ref name="parag"/>
</oneOrMore>
@@ -619,6 +677,33 @@
<define name="highlight.content">
<ref name="inlines"/>
</define>
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <define name="term">
+ <element name="term">
+ <ref name="term.content"/>
+ </element>
+ </define>
+ <define name="term.content">
+ <ref name="inlines"/>
+ </define>
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mentioned ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <define name="mentioned">
+ <element name="mentioned">
+ <ref name="mentioned.content"/>
+ </element>
+ </define>
+ <define name="mentioned.content">
+ <ref name="inlines"/>
+ </define>
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <define name="quote">
+ <element name="quote">
+ <ref name="quote.content"/>
+ </element>
+ </define>
+ <define name="quote.content">
+ <ref name="inlines"/>
+ </define>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<define name="link">
<element name="link">
--- a/RelaxNG/publiset.rnc dim. juin 05 23:51:15 2011 +0200
+++ b/RelaxNG/publiset.rnc lun. juin 06 21:51:00 2011 +0200
@@ -70,9 +70,12 @@
remap.attributes
metadata.content =
- title?,
- subtitle?,
- source?
+ title?
+ & subtitle?
+ & author*
+ & publisher?
+ & language?
+ & source?
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -82,6 +85,37 @@
subtitle = element subtitle { title.content }
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ author, publisher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# ~~~~~~ author
+author = element author { author.content }
+
+author.content =
+ firstname?,
+ lastname
+
+# ~~~~~~ publisher
+publisher = element publisher { publisher.content }
+
+publisher.content = inlines
+
+# ~~~~~~ firstname
+firstname = element firstname { firstname.content }
+
+firstname.content = inlines
+
+# ~~~~~~ lastname
+lastname = element lastname { lastname.content }
+
+lastname.content = inlines
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+language = element language { language.attributes }
+
+language.attributes = lang.attribute
+lang.attribute = attribute xml:lang { xsd:language }
+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~ source
--- a/RelaxNG/publiset.rng dim. juin 05 23:51:15 2011 +0200
+++ b/RelaxNG/publiset.rng lun. juin 06 21:51:00 2011 +0200
@@ -117,15 +117,26 @@
<ref name="remap.attributes"/>
</define>
<define name="metadata.content">
- <optional>
- <ref name="title"/>
- </optional>
- <optional>
- <ref name="subtitle"/>
- </optional>
- <optional>
- <ref name="source"/>
- </optional>
+ <interleave>
+ <optional>
+ <ref name="title"/>
+ </optional>
+ <optional>
+ <ref name="subtitle"/>
+ </optional>
+ <zeroOrMore>
+ <ref name="author"/>
+ </zeroOrMore>
+ <optional>
+ <ref name="publisher"/>
+ </optional>
+ <optional>
+ <ref name="language"/>
+ </optional>
+ <optional>
+ <ref name="source"/>
+ </optional>
+ </interleave>
</define>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<define name="title">
@@ -141,6 +152,60 @@
<ref name="title.content"/>
</element>
</define>
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ author, publisher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <!-- ~~~~~~ author -->
+ <define name="author">
+ <element name="author">
+ <ref name="author.content"/>
+ </element>
+ </define>
+ <define name="author.content">
+ <optional>
+ <ref name="firstname"/>
+ </optional>
+ <ref name="lastname"/>
+ </define>
+ <!-- ~~~~~~ publisher -->
+ <define name="publisher">
+ <element name="publisher">
+ <ref name="publisher.content"/>
+ </element>
+ </define>
+ <define name="publisher.content">
+ <ref name="inlines"/>
+ </define>
+ <!-- ~~~~~~ firstname -->
+ <define name="firstname">
+ <element name="firstname">
+ <ref name="firstname.content"/>
+ </element>
+ </define>
+ <define name="firstname.content">
+ <ref name="inlines"/>
+ </define>
+ <!-- ~~~~~~ lastname -->
+ <define name="lastname">
+ <element name="lastname">
+ <ref name="lastname.content"/>
+ </element>
+ </define>
+ <define name="lastname.content">
+ <ref name="inlines"/>
+ </define>
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <define name="language">
+ <element name="language">
+ <ref name="language.attributes"/>
+ </element>
+ </define>
+ <define name="language.attributes">
+ <ref name="lang.attribute"/>
+ </define>
+ <define name="lang.attribute">
+ <attribute name="xml:lang">
+ <data type="language"/>
+ </attribute>
+ </define>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- ~~~~~~ source -->
<define name="source">