help with matching invalid dates
Are you missing a feature? Request its implementation here.
-
- Posts: 2
- Joined: Thu Feb 24, 2005 7:14 pm
help with matching invalid dates
Post by dizziedazz »
Can someone help me to create a pattern that identifies "Invalid" dates. Eg. 7/412/02 or 10/1902. Correct dates will be in mm/dd/yy(yy)? format.
Thanks
DzDz
Thanks
DzDz
Hi,
Since you are using XML Schema you should check the date built in type and see if you can use that:
http://www.w3.org/TR/xmlschema-2/#date
Otherwise you can constrain the string type for instance like below (or you can invent more strict constraints):
Best Regards,
George
Since you are using XML Schema you should check the date built in type and see if you can use that:
http://www.w3.org/TR/xmlschema-2/#date
Otherwise you can constrain the string type for instance like below (or you can invent more strict constraints):
Code: Select all
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="\d\d/\d\d/\d\d(\d\d)?"/>
</xs:restriction>
</xs:simpleType>
George
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service