ASCII characters
This should cover W3C XML Schema, Relax NG and DTD related problems.
ASCII characters
Post by Guest »
Hi,
I have a string(6-240 characters) for which I need to check that each of the characters is a valid ASCII character. Any ideas?
Thank You,
Ilan
I have a string(6-240 characters) for which I need to check that each of the characters is a valid ASCII character. Any ideas?
Thank You,
Ilan
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi,
You can have something like:
This will accept between 6 and 240 ASCII characters as the content of the test element.
Hope that helps,
George
You can have something like:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="test" type="test"/>
<xs:simpleType name="test">
<xs:restriction base="xs:string">
<xs:pattern value="(\p{IsBasicLatin})*"/>
<xs:maxLength value="240"/>
<xs:minLength value="6"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
Hope that helps,
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