Length Limit on XHTML type in a schema document.

Binesh Bannerjee

Usenet Archive
Joined
Nov 27, 2004
Messages
3
Reaction score
0
Hi...
I've asked before about making an element in a schema be able to use xhtml... I've attached my schema definition below...

What I'm curious about, is whether there's a means to add a length restriction to the memo field in there... I want to restrict it to say 200 bytes, including tags and all... Is that possible? Something like the way I can do this for a string field? <xsd:simpleType name="fifteen"> <xsd:restriction base="xsd:string"> <xsd:maxLength value="15"/> </xsd:restriction> </xsd:simpleType>

Thanks! My schema definition follows.
Binesh

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xhtml="http://www.w3.org/1999/xhtml" version="1.0"> <xs:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="xhtml1-strict.xsd" /> <xs:element name="person"> <xs:complexType> <xs:sequence> <xs:element name="name"> <xs:complexType> <xs:sequence> <xs:element name="first" type="xs:string" /> <xs:element name="last" type="xs:string" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="memo" type="xhtml:Block" /> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,049
Messages
3,104,243
Members
248,133
Latest member
DujonT

Latest Threads

Top