[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: use of XSD datatypes
Hello, below is how I've written part of a grammar to create an "fm.version" type for the version attribute. ____________________________________________________________________________ _ <grammar xmlns="http://relaxng.org/ns/structure/0.9" xmlns:rng="http://relaxng.org/ns/structure/0.9" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"> ... <define name="fm.version"> <data type="string"> <param name="pattern">[0-9]+[\s\t]*\.[\s\t]*[0-9]+[\s\t]*\.[\s\t]*[0-9]+[\s\t]*</pa ram> </data> </define> ... <define name="entity.attrib"> <attribute name="version" > <ref name="fm.version"/> </attribute> </define> ... </grammar> ____________________________________________________________________________ __ This seems to work with jing (with the needed .jar). Now I assume that somebody on the net has written an XSD simpleType for software releases, which is OK for me. So, I'd like to reuse this "standard" type. How should I write my grammar to let it work ? I've tried this below but jing tells me that the type "std-soft-version" from library "version-type" is not recognized. I don't know if I'm wrong, or if it is due to a limitation of jing...or both. _____________________________________________________________ version-type.xsd contains: <xsd:simpleType name="std-soft-version" xmlns:xsd="http://www.w3.org/2001/XMLSchema-datatypes"> <xsd:restriction base="xsd:string"> <xsd:pattern value="[0-9]+[\s\t]*\.[\s\t]*[0-9]+[\s\t]*\.[\s\t]*[0-9]+[\s\t]*"/> </xsd:restriction> </xsd:simpleType> the grammar contains: <define name="fm.version" datatypeLibrary="version-type.xsd"> <data type="std-soft-version"/> </define> ______________________________________________________________ regards, Franck.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC