On 18/10/05, Eric van der Vlist <[EMAIL PROTECTED]> wrote:
>
> <choice>
> <data type="date">
> <param name="pattern">\d{4}-\d{2}-\d{2}</param>
> </data>
> <data type="gYearMonth">
> <param name="pattern">\d{4}-\d{2}</param>
> </data>
> <data type="gYear">
> <param name="pattern">\d{4}</param>
> </data>
> </choice>
With schema
<define name="Dates">
<element name="dates">
<oneOrMore>
<element name="date">
<ref name="fmt.8601"/>
</element>
</oneOrMore>
</element>
</define>
<define name="fmt.8601">
<choice>
<data type="date">
<param name="pattern">\d{4}-\d{2}-\d{2}</param>
</data>
<data type="gYearMonth">
<param name="pattern">\d{4}-\d{2}</param>
</data>
<data type="gYear">
<param name="pattern">\d{4}</param>
</data>
</choice>
</define>
and instance
<?xml version="1.0" encoding="iso-8859-1"?>
<dates xmlns="http://www.daisy.org/z3986/2005/dtbook/">
<date>2004</date>
<date>2005</date>
<date>2005-01</date>
<date>2005-03</date>
<date>2005-04</date>
<date>2005-10-01</date>
</dates>
jing reports
C:\sgml\relax\dates.xml:7:23: error: bad character content for element
C:\sgml\relax\dates.xml:8:26: error: bad character content for element
I.e.
<date>2005-03</date> is OK
<date>2005-04</date> is invalid.
nxml reports OK
msv reports OK.
I can't think of any more test cases to give it.
I'm confused.
Any help appreciated.
--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/2U_rlB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/rng-users/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/