diff options
Diffstat (limited to 'testdata')
-rw-r--r-- | testdata/osmlparser/simple_book.osml | 54 | ||||
-rw-r--r-- | testdata/osxmlparser/bibliography_domain.osxml | 6 | ||||
-rw-r--r-- | testdata/osxmlparser/book_domain.osxml | 4 |
3 files changed, 20 insertions, 44 deletions
diff --git a/testdata/osmlparser/simple_book.osml b/testdata/osmlparser/simple_book.osml index e8639b8..21751b9 100644 --- a/testdata/osmlparser/simple_book.osml +++ b/testdata/osmlparser/simple_book.osml @@ -1,55 +1,31 @@ -%{ -This is just a simple document for toying around -}% -\import{../osxmlparser/book_domain.osxml} -\import{../osxmlparser/headings_domain.osxml} - -% Define some local domain here -\domain#stuff - \import[rel=typesystem]{../osxmlparser/color.osxml} - \import[rel=domain]{../osxmlparser/book_domain.osxml} - \struct#fancy - \primitive#myLittleColor[type=color] - \parentRef[ref=book] - \fieldRef[ref="$default"] +\import[domain]{../osxmlparser/book_domain.osxml} +\import[domain]{../osxmlparser/headings_domain.osxml} + +%\domain#stuff +% \import[typesystem]{../osxmlparser/color.osxml} +% \struct#fancy +% \primitive#bla[type=color] +% \parentRef[ref=book] +% \fieldRef[ref=$default] \begin{book} This might be some introductory text or a dedication. -\chapter#myFirstChapter -\heading{My first chapter} +\chapter#myFirstChapter{My first chapter} Here we might have an introduction to the chapter. \section#myFirstSection \heading{A rather curious experiment} +\paragraph{!Here we might find the actual section content. +\heading{test}} -\paragraph +\section#mySndSection Here we might find the actual section content. -\paragraph -Test -\section#mySndSection -Here we might find the actual section content. +bla -% Create a simple fancy instance -\fancy{[10,g=10,b=10]} - -%{ -Note that this - \fancy [10,g=10,b=10] -will also work (since the braces are not counted as commands). However - \fancy [t=10,g=10,b=10] -will leave the fancy field empty and assign the data as string to the above -paragraph. -}% - -%{ -Another note: In the short term the behaviour of the "{" and "}" tokens should -be changed in the parser. They should only be parsed when they are valid (after -commands and after a closing field). This can easily be hacked in (albeit it -will be ugly) -}% +%\fancy{aquamarine} \end{book} diff --git a/testdata/osxmlparser/bibliography_domain.osxml b/testdata/osxmlparser/bibliography_domain.osxml index 6418c61..53ba531 100644 --- a/testdata/osxmlparser/bibliography_domain.osxml +++ b/testdata/osxmlparser/bibliography_domain.osxml @@ -13,14 +13,14 @@ </parentRef> </struct> <struct name="bibEntry"> - <field name="authors" optional="true"> - <childRef ref="meta.author"/> - </field> <primitive name="name" type="string" isSubtree="true"/> <primitive name="year" type="int" isSubtree="true"/> <primitive name="journal" type="string" isSubtree="true" optional="true"/> <primitive name="pages" type="cardinality" isSubtree="true" optional="true"/> <!-- Here a geographical enum or something would be more exact --> <primitive name="location" type="string" isSubtree="true" optional="true"/> + <field name="authors" optional="true"> + <childRef ref="meta.author"/> + </field> </struct> </domain> diff --git a/testdata/osxmlparser/book_domain.osxml b/testdata/osxmlparser/book_domain.osxml index 4218915..5a8cc67 100644 --- a/testdata/osxmlparser/book_domain.osxml +++ b/testdata/osxmlparser/book_domain.osxml @@ -75,7 +75,7 @@ <childRef ref="book.paragraph"/> </field> </struct> - <struct name="paragraph" transparent="true" role="paragraph"> + <struct name="paragraph" transparent="true"> <!-- implicitly: <struct name="subsection" isRoot="false" cardinality="{*}" transparent="true" isa="" attributesDescriptor=""> @@ -87,7 +87,7 @@ <childRef ref="book.text"/> </field> </struct> - <struct name="text" transparent="true" role="text"> + <struct name="text" transparent="true"> <!-- implicitly: <struct name="text" isRoot="false" cardinality="{*}" transparent="true" isa="" attributesDescriptor=""> |