The Open Healthcare Group

XEditor

XEditor is an XML vocabulary which specifies an editing list for an XML document. An XEditor document can be compiled using an XSLT transformation into an XSLT which carries out the specified editing list.

An example using edit:append

The resultant XSLT

An example using edit:insert-before

The resultant XSLT

A sample data file

The XEditor namespace: "http://www.openhealth.org/editor "

The vocabulary:

editlist append insert-before replace replace-or-append delete param variable value element element-if attribute

<edit:editlist [path-prefix="..."]

> commands </edit:editlist>

<edit:append match=" ... xpath expr ... " [ select="...value..."]> value </edit:append>

<edit:insert-before match=" ... xpath expr ... "> [ select="...value..."] value </edit:insert-before>

<edit:replace match=" ... xpath expr ..." [ select="...value..." ]> value </edit:replace>

<edit:replace-or-append test=" ... xpath expr ..." [ select="...value..." ]> value </edit:replace-or-append>

<edit:delete match=" ... xpath expr ..." />

<edit:param name=" ... " select=" ... " /> ... transforms to xsl:param

<edit:variable name=" ..." select=" ... " /> ... transforms to xsl:variable

<edit:value select="..." /> ... transforms to xsl:value-of

<edit:element name="...AVT..." [ select= "...value..."] />

<edit:element-if name="...AVT..." select="...expr..." /> ... creates an element if expr is not null

<edit:attribute name="...AVT..." [ select= "...value..."] />

Comments?

This is an early draft