From: <ker...@us...> - 2010-01-27 19:51:29
|
Revision: 17104 http://jedit.svn.sourceforge.net/jedit/?rev=17104&view=rev Author: kerik-sf Date: 2010-01-27 19:51:22 +0000 (Wed, 27 Jan 2010) Log Message: ----------- test case for include in RelaxNG Added Paths: ----------- plugins/XML/trunk/test_data/parentRef/ plugins/XML/trunk/test_data/parentRef/actual_table.rng plugins/XML/trunk/test_data/parentRef/instance.xml plugins/XML/trunk/test_data/parentRef/schemas.xml plugins/XML/trunk/test_data/parentRef/table.rng Added: plugins/XML/trunk/test_data/parentRef/actual_table.rng =================================================================== --- plugins/XML/trunk/test_data/parentRef/actual_table.rng (rev 0) +++ plugins/XML/trunk/test_data/parentRef/actual_table.rng 2010-01-27 19:51:22 UTC (rev 17104) @@ -0,0 +1,38 @@ +<?xml version="1.0" ?> +<!-- example taken from the RelaxNG Tutorial + http://www.relaxng.org/tutorial-20011203.html + Copyright The Organization for the Advancement of Structured Information Standards [OASIS] 2001. All Rights Reserved. + --> +<grammar xmlns="http://relaxng.org/ns/structure/1.0"> + +<start> + <element name="doc"> + <zeroOrMore> + <choice> + <element name="p"> + <ref name="inline"/> + </element> + <grammar> + <include href="table.rng"> + <define name="cell.content"> + <parentRef name="inline"/> + </define> + </include> + </grammar> + </choice> + </zeroOrMore> + </element> +</start> + +<define name="inline"> + <zeroOrMore> + <choice> + <text/> + <element name="em"> + <ref name="inline"/> + </element> + </choice> + </zeroOrMore> +</define> + +</grammar> Added: plugins/XML/trunk/test_data/parentRef/instance.xml =================================================================== --- plugins/XML/trunk/test_data/parentRef/instance.xml (rev 0) +++ plugins/XML/trunk/test_data/parentRef/instance.xml 2010-01-27 19:51:22 UTC (rev 17104) @@ -0,0 +1,13 @@ +<?xml version="1.0" ?> +<!-- valid file, demonstrating inclusion of grammars --> +<doc> +<p>Hello <em>world</em>.</p> + +<!-- XML Insert should propose p and table --> +<table> +<tr><td>cell nr <em>1</em></td></tr> +<tr><td> <!-- XML Insert should propose <em> --></td></tr> +</table> + +</doc> +<!-- FIXME: XML Insert proposes em, p, tr --> Property changes on: plugins/XML/trunk/test_data/parentRef/instance.xml ___________________________________________________________________ Added: svn:keywords + Id Author Revision Date Head Added: plugins/XML/trunk/test_data/parentRef/schemas.xml =================================================================== --- plugins/XML/trunk/test_data/parentRef/schemas.xml (rev 0) +++ plugins/XML/trunk/test_data/parentRef/schemas.xml 2010-01-27 19:51:22 UTC (rev 17104) @@ -0,0 +1,5 @@ +<?xml version="1.0" ?> +<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0"> + <uri resource="instance.xml" uri="actual_table.rng"/> + <include rules="file:/Users/elelay/Library/jEdit/plugins/xml.XmlPlugin/schemas.xml" /> +</locatingRules> \ No newline at end of file Property changes on: plugins/XML/trunk/test_data/parentRef/schemas.xml ___________________________________________________________________ Added: svn:keywords + Id Author Revision Date Head Added: plugins/XML/trunk/test_data/parentRef/table.rng =================================================================== --- plugins/XML/trunk/test_data/parentRef/table.rng (rev 0) +++ plugins/XML/trunk/test_data/parentRef/table.rng 2010-01-27 19:51:22 UTC (rev 17104) @@ -0,0 +1,26 @@ +<?xml version="1.0" ?> +<!-- example taken from the RelaxNG Tutorial + http://www.relaxng.org/tutorial-20011203.html + Copyright The Organization for the Advancement of Structured Information Standards [OASIS] 2001. All Rights Reserved. + --> +<grammar xmlns="http://relaxng.org/ns/structure/1.0"> + +<define name="cell.content"> + <notAllowed/> +</define> + +<start> + <element name="table"> + <oneOrMore> + <element name="tr"> + <oneOrMore> + <element name="td"> + <ref name="cell.content"/> + </element> + </oneOrMore> + </element> + </oneOrMore> + </element> +</start> + +</grammar> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |