Re: XML Editor

"Brian Heilig" <Brian.Heilig-tdt4z+Mb/[email protected]>
Newsgroups gmane.comp.lang.eiffel.gobo.general
Message-ID <[email protected]>
> Berend de Boer wrote:
> 
> Here the .rnc's.
> 

Were you going to attach the .rnc? I already have it (I used Trang). 
I'll paste it below. Everything is working now, thanks a lot. What I 
think would be extremely helpful is a brief description of each 
element and when/why you would use them. Some are very obvious, like 
<para>. Others are not so obvious, like informalexample, warning, or 
ulink.

Here is the .rnc:

# description: "Gobo Documentation RelaxNG specification"
# system: "Gobo Eiffel"
# copyright: "Copyright (c) 2004, Eric Bezault and others"
# license: "MIT License"
# date: "$Date: 2007-01-26 13:55:25 -0500 (Fri, 26 Jan 2007) $"
# revision: "$Revision: 5877 $"

default namespace 
= "http://www.gobosoft.com/eiffel/gobo/documentation"

start = chapter | book
# Document structure
book =
  element book {
    title,
    # bookinfo?
    chapter+
  }
chapter =
  element chapter {
    attribute id { text },
    chapterinfo,
    title,
    paras,
    section*
  }
section =
  element section {
    attribute id { text }?,
    title,
    paras,
    section*
  }
title = element title { (inline_eiffel | inline_markup | text)+ }
chapterinfo =
  element chapterinfo {
    element copyright {
      element year { text },
      element holder { text }
    },
    element author {
      element firstname { text },
      element surname { text }
    },
    element email { text },
    element date { text }
  }?
# Paragraph
paras =
  (element para { inline_content }
   | element programlisting { text }
   | variablelist
   | orderedlist
   | itemizedlist
   | table
   | synopsis)*
synopsis = element synopsis { text }
variablelist =
  element variablelist {
    element varlistentry {
      element term { inline_content }+,
      listitem+
    }+
  }
itemizedlist = element itemizedlist { listitem+ }
orderedlist = element orderedlist { listitem+ }
listitem = element listitem { paras }
table =
  element table {
    element title { text },
    element tgroup {
      attribute cols { text },
      element thead { tablerow },
      element tbody { tablerow+ }
    }
  }
tablerow =
  element row {
    element entry { text }+
  }
mediaobjectco =
  element mediaobjectco {
    element imageobjectco {
      element areaspec {
        element area {
          attribute coords { text },
          attribute linkend { text }
        }+
      },
      element imageobject {
        element imagedata {
          attribute align { text },
          attribute fileref { text }
        }
      }
    }
  }
# Inline content
inline_content =
  (inline_eiffel
   | inline_markup
   | text
   | # structured inlines (should be at para level?)
     variablelist
   | itemizedlist
   | mediaobjectco
   | # are these structural?
     element blockquote { paras, inline_content }
   | element warning { inline_content })+
inline_markup =
  # Typographical inline markup
  element emphasis {
    attribute role { text }?,
    inline_content
  }
  | element quote { inline_content }
  | element filename {
      attribute class { text },
      text
    }
  | element citetitle {
      attribute pubwork { text }?,
      inline_content
    }
  | element anchor {
      attribute id { text }
    }
  | element link {
      attribute linkend { text },
      inline_content
    }
  | element ulink {
      attribute url { text },
      inline_content
    }
  | element exmlsyntax { text }
  | element envar { text }
  | element xpath { text }
  | element uri { text }
  | element xslt { text }
  | element informalexample { programlisting }
  | text
inline_eiffel =
  element projectname { text }
  | element libraryname { text }
  | element classname { inline_flatshort }
  | element featurename { inline_flatshort }
  | element infixname { inline_flatshort }
  | element argument { text }
  | element featurecall {
      element featurename { inline_flatshort },
      element arguments {
        element argument { text }+
      }?
    }
  | element constructname { text }
  | element comment { text }
    # should be eiffel code more generally?
    
inline_flatshort =
  attribute flatshort { text }?,
  text
# Eiffel code
programlisting = element programlisting { (compound)+ }
compound =
  element compound {
    attribute role { text }?,
    (element if { expression, compound, compound }
     | element assign { target, expression }
     | element loop {
         attribute indent { text },
         compound*,
         element until { expression },
         compound
       }
     | featurecall)+
  }
expression =
  element expression {
    element equal { expression, expression }
    | element true { empty }
    | element false { empty }
    | element integer { text }
    | featurecall
  }
featurecall =
  element featurecall {
    target?,
    element featurename { text },
    element arguments { featurecall+ }?
  }
target =
  element target {
    element local { text }
  }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.