From: <joe...@us...> - 2009-11-27 13:09:41
|
Revision: 2412 http://daisymfc.svn.sourceforge.net/daisymfc/?rev=2412&view=rev Author: joeha480 Date: 2009-11-27 13:09:30 +0000 (Fri, 27 Nov 2009) Log Message: ----------- Added width and height check to PEF-validation Modified Paths: -------------- trunk/dmfc/src/org/daisy/util/xml/catalog/pef/pef-2008-1.rng Modified: trunk/dmfc/src/org/daisy/util/xml/catalog/pef/pef-2008-1.rng =================================================================== --- trunk/dmfc/src/org/daisy/util/xml/catalog/pef/pef-2008-1.rng 2009-11-24 13:27:28 UTC (rev 2411) +++ trunk/dmfc/src/org/daisy/util/xml/catalog/pef/pef-2008-1.rng 2009-11-27 13:09:30 UTC (rev 2412) @@ -3,9 +3,12 @@ ns="http://www.daisy.org/ns/2008/pef" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" + xmlns:sch="http://www.ascc.net/xml/schematron" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" > + <sch:ns prefix="pef" uri="http://www.daisy.org/ns/2008/pef"/> + <a:documentation> RELAX NG schema for PEF 1.0 - Portable Embosser Format Public Draft 12 February 2009 @@ -413,4 +416,18 @@ <data type="positiveInteger"/> </define> + <!-- Rule 1: Check that result does not have too many rows on a page --> + <sch:pattern name="rows_on_page" id="rows_on_page"> + <sch:rule context="pef:page"> + <sch:assert test="count(pef:row)<=(ancestor::pef:*[@rows][1])/@rows">[Rule 1] Too many rows on page</sch:assert> + </sch:rule> + </sch:pattern> + + <!-- Rule 2: Check that result does not have too many characters on a row --> + <sch:pattern name="chars_on_row" id="chars_on_row"> + <sch:rule context="pef:row"> + <sch:assert test="string-length(text())<=(ancestor::pef:*[@cols][1])/@cols">[Rule 2] Too many characters on row</sch:assert> + </sch:rule> + </sch:pattern> + </grammar> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |