Skip to content

Instantly share code, notes, and snippets.

@skoji
Created November 10, 2010 08:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skoji/670570 to your computer and use it in GitHub Desktop.
Save skoji/670570 to your computer and use it in GitHub Desktop.
well-formed YDML definition in Relax NG Compact Syntax
start = element ydml { Block* }
Block = Paragraph* & Center* & Left* & Right* & Quote* & Hasen*
Paragraph = Inline +
Inline = Large|Small|Bold|Image|Ruby|text
Center = element center { Inline+ }
Left = element left { Inline+ }
Right = element right { Inline+ }
Quote = element quote { Inline+ }
Hasen = element hasen { empty }
Large = element large { Inline+ }
Small = element small { Inline+ }
Bold = element bold { Inline+ }
Ruby = element ruby { text }
Image =
element image {
attribute src { text },
attribute size { text }?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment