Specification

From EXPath

(Difference between revisions)
Jump to: navigation, search
 
Line 5: Line 5:
The schema used for specifications is W3C's XMLSpec, used for W3C's specifications, drafts and notes.  This doctype was written initially for the XML spec itself (hence its name) and has been customized by several working groups over the years, for their own needs, so there are a few different versions available over there. You can read the [http://www.w3.org/XML/1998/06/xmlspec-report.htm user guide] and the [http://www.w3.org/2002/xmlspec/ resources listing] of the official version for more informations.
The schema used for specifications is W3C's XMLSpec, used for W3C's specifications, drafts and notes.  This doctype was written initially for the XML spec itself (hence its name) and has been customized by several working groups over the years, for their own needs, so there are a few different versions available over there. You can read the [http://www.w3.org/XML/1998/06/xmlspec-report.htm user guide] and the [http://www.w3.org/2002/xmlspec/ resources listing] of the official version for more informations.
-
For EXPath we use the latest version of this doctype, pre-installed in oXygen for instance.  There are a few new elements for the special needs of EXPath (e.g. function signatures). Those changed still have to be described here.
+
For EXPath, we use the latest version of this doctype, with a few differences like new elements for the function signatures. Everything is available in the Subversion repository under [http://code.google.com/p/expath/source/browse/#svn/trunk/process/xmlspec trunk/process/xmlspec].
==Setup==
==Setup==
Line 13: Line 13:
==Example==
==Example==
-
While waiting for more rigorous documentation, here are everything you should need to create a spec for EXPath and transform it to its final XHTML format. The first file is a [http://expath.org/tmp/zip.xml source example].  It contains a few content, but shows the complete overall structure of a specification. You will need to transform it with the EXPath's [http://expath.org/tmp/xmlspec-fg.xsl stylesheet], which imports the W3C's [http://expath.org/tmp/xmlspec.xsl stylesheet]. To transform it, use your preferred XSLT processor.  For instance using Saxon 9+:
+
In order to transform a spec to XHTML, you just have to transform it with you favorite XSLT 2.0 processor using the stylesheet <code>trunk/process/xmlspec/xmlspec.xsl</code>.  For instance with Saxon:
<pre>
<pre>
-
java -cp saxon9.jar net.sf.saxon.Transform -xsl:xmlspec-fg.xsl -s:zip.xml -o:zip.html
+
saxon -xsl:.../process/xmlspec/xmlspec.xsl -s:my-spec.xml -o:my-spec.html
</pre>
</pre>

Current revision as of 07:59, 8 October 2010

Informations about specifications, especially specification authoring.

The schema

The schema used for specifications is W3C's XMLSpec, used for W3C's specifications, drafts and notes. This doctype was written initially for the XML spec itself (hence its name) and has been customized by several working groups over the years, for their own needs, so there are a few different versions available over there. You can read the user guide and the resources listing of the official version for more informations.

For EXPath, we use the latest version of this doctype, with a few differences like new elements for the function signatures. Everything is available in the Subversion repository under trunk/process/xmlspec.

Setup

TODO: Describe how to transform a spec written using XMLSpec to XHTML with EXPath specifics (layout, logo, etc.)

Example

In order to transform a spec to XHTML, you just have to transform it with you favorite XSLT 2.0 processor using the stylesheet trunk/process/xmlspec/xmlspec.xsl. For instance with Saxon:

saxon -xsl:.../process/xmlspec/xmlspec.xsl -s:my-spec.xml -o:my-spec.html
Personal tools