[OpenAjaxIDE] relax NG syntax

Jon Ferraiolo jferrai at us.ibm.com
Wed Sep 3 10:55:40 PDT 2008


Hi Lori,
Actually, the full schema, including definitions for the various
attributes, are posted at:

http://www.openajax.org/schema/OpenAjaxMetadata/1.0

The above files contain the official "truth" about the language schema. The
Validator widget (from the InteropFest) links to those files when it runs
and the spec links to those files for the snippets that appear inline
within the spec. (via a small mediawiki extension that I wrote).

I have the spec set up to copy the element definitions from the schema into
the spec (via the mediawiki extension) but I haven't done it for the
attribute definitions because they are mostly trivial, such as the
following lines that are found in WidgetMetadata.rnc:
---------------------
aboutUri = attribute aboutUri { text }    # FIXME: define value as a URI
using XSD
height = attribute height { text }    # FIXME: define value non-negative
integer using XSD
id_attribute = attribute id { text }    # FIXME: URI
jsClass = attribute jsClass { text }    # FIXME: define value as JS
dot-name using XSD
name = attribute name { text }    # FIXME: define value as JS dot-name
using XSD
sandbox = attribute sandbox { text }  # FIXME: define value as boolean
using XSD
scrolling = attribute scrolling { text }    # FIXME: define value as
boolean using XSD
singleton = attribute singleton { text }  # FIXME: define value as boolean
using XSD
spec = attribute spec { text }    # FIXME: define value as OpenAjax version
string using XSD
version = attribute version { text }    # FIXME: define value as OpenAjax
version string using XSD
width = attribute width { text }    # FIXME: define value non-negative
integer using XSD
---------------------

Really not all that interesting! The spec describes the attributes in
words, such as whether the attribute is a string or a boolean or whatever,
its default value, and other interesting information.,

As you can see by the FIXME comments above, I need to update the schema to
specify the supported values for the various attributes more specifically
than just "text". I don't think that will be a huge amount of work, but I
haven't done it yet.

Another thing that I need to do is to put the schema into our open source
project. Right now I just update my own private copy and then FTP it up to
the server. It should be in SVN so that we can track the history. Again,
not a major effort to do this.

Jon



                                                                           
             Lori Hylan-Cho                                                
             <lorihc at aptana.co                                             
             m>                                                         To 
             Sent by:                  "ide at openajax.org"                  
             ide-bounces at opena         <ide at openajax.org>                  
             jax.org                                                    cc 
                                                                           
                                                                   Subject 
             09/03/2008 09:55          [OpenAjaxIDE] relax NG syntax       
             AM                                                            
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




This is a question mostly for Jon, since he wrote the syntax, though if
anyone else knows the answer, feel free to chime in.

The engineer who's implementing the OAA metadata on our side & I have been
looking at the API spec and trying to puzzle through the Relax NG syntax.
As he noted, it's easy for a human to see that in the following
description, api_attributes is a list of attributes.

api_element = element api {
  api_content  &  api_attributes  &  foreign_nodes
}
api_content = (
  author_element*  &  authors_element?  &  class_element*  &
classes_element?  &
  globals_element?  &  interface_element*  &  interfaces_element?  &
license_element?  &
  mixin_element*  &  mixins_element?  &  namespace_element*  &
namespaces_element?  &
  descriptive_elements
)
api_attributes = (
  getterPattern?  &  language?  &  setterPattern?  &  spec?  &  version?
)

However, it's not easy for a machine to make that distinction. I can see
that api_element is specifically defined as element api, but where are the
api_attributes defined as attribute? Shouldn't they be, or am I reading the
Relax NG spec wrong?

Lori

-----------------------------------------------------------------------
Lori Hylan-Cho             Ajax Wrangler        Aptana, Inc.
lorihc at aptana.com          650.207.1905         avocadoh (Y!/AIM/GTalk)
 _______________________________________________
IDE mailing list
IDE at openajax.org
http://openajax.org/mailman/listinfo/ide
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openajax.org/pipermail/ide/attachments/20080903/36b5fdb0/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
Url : http://openajax.org/pipermail/ide/attachments/20080903/36b5fdb0/attachment-0003.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pic23726.gif
Type: image/gif
Size: 1255 bytes
Desc: not available
Url : http://openajax.org/pipermail/ide/attachments/20080903/36b5fdb0/attachment-0004.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://openajax.org/pipermail/ide/attachments/20080903/36b5fdb0/attachment-0005.gif 


More information about the IDE mailing list