[relaxng-user] extensibility question

Bruce D'Arcus bdarcus at fastmail.fm
Thu Sep 23 08:45:52 ICT 2004


I have a schema that I wrote in conjunction with an OpenOffice engineer 
at Sun.  It is a namespaced schema for citation coding, and has 
recently been approved for inclusion in the OOo file format.

I'd like to publish the schema, but I want to modify it in such a way 
that it can be easily customized for use in other document languages 
(say WordML, which is an XML Schema of course).  Does anyone have any 
suggestions on how to do this?  I'll paste the relevant code below, 
with comments.

Bruce

======
default namespace xbc = "http://purl.org/NET/xbiblio/cite/1.0"

start = citation-element

## A citation consists of two elements; one the structural source data
## and the other the presentational display.  The latter's content will
## thus depend on that document language in which it is embedded.
citation-element = element citation {
    citation-source-element,
    citation-body-element?
}

[... snip ...]

## We leave the element to contain the rendered code uncontrolled
## for now.  I'd like this to be defined in such a way that it can be
## most cleanly modified for use in different document standards.
citation-body-element = element citation-body { anyStuff }

anyStuff =
   element * {
     mixed {
       (anyStuff
        | attribute * { text })*
     }
   }



More information about the relaxng-user mailing list