Loading ...
Sorry, an error occurred while loading the content.
 

Does merge of two schema require rewriting of existing code?

Expand Messages
  • gavenkoa
    Sorry, this message may be some offtopic for this list. I try write compact RELAX NG schema for Blogger template. Look at used namespaces:
    Message 1 of 2 , Jan 31, 2011
      Sorry, this message may be some offtopic for this list.

      I try write compact RELAX NG schema for Blogger template. Look at used
      namespaces:

      <html dir='ltr'
      xmlns='http://www.w3.org/1999/xhtml'
      xmlns:b='http://www.google.com/2005/gml/b'
      xmlns:data='http://www.google.com/2005/gml/data'
      xmlns:expr='http://www.google.com/2005/gml/expr'>

      As Emacs 23.2 already have 'xhtml.rnc' file for 'http://www.w3.org/1999/xhtml'
      I try reuse them. I think that only need write rules for Google namespace and
      merge them.

      If anyone interesting how look target .xml file visit link:

      http://code.google.com/p/brain-break-blog/source/browse/gavenkoa-exp.blogspot.com.xml

      But I get difficult in merging new schema into existing. For example target
      xml contain this code:

      <title><data:blog.pageTitle/></title>

      This code from 'xhtml-struct.rnc':

      title = element title { title.attlist, text }

      As I understand RELAX NG upper rule don't allow me integrate:

      gml-data.blog.pageTitle = element blog.pageTitle {empty}

      into it to become:

      title = element title {
      title.attlist
      & text*
      & gml-data.blog.pageTitle*
      }

      Does I need make own 'xhtml.rnc' to allow merge into it new syntax?

      In "RELAX NG Compact Syntax Tutorial" for extensibility used such pattern:

      inline =
      (text
      | element bold { inline }
      | element italic { inline }
      | inline.extra)*
      inline.extra = notAllowed

      which I can not found in 'xhtml*.rnc' files.

      What you recommend?
    • gavenkoa
      ... After spending some effort on this area I found that Blogger template is case of incorrect applying of XML. Really Blogger tags used as preprocessor for
      Message 2 of 2 , Feb 3, 2011
        "gavenkoa" <gavenkoa@...> wrote:
        >
        > I try write compact RELAX NG schema for Blogger template.>
        > What you recommend?
        >
        After spending some effort on this area I found that Blogger template is case of incorrect applying of XML.

        Really Blogger tags used as preprocessor for XHTML, not as structured data. So I stop.

        Backing to subject I can say that built-in Emacs xhtml*.rnc allow merging with other xml schema through named patterns, which present in 'xhtml*.rnc':

        ...
        Block.class |= Form.class
        Inline.class |= font | basefont | s | strike | u
        ...

        but in some way limited. You can read how this make in

        http://www.relaxng.org/tutorial-20011203.html#IDAX4YR
      Your message has been successfully submitted and would be delivered to recipients shortly.