Length Limit on XHTML type in a schema document.

B

Binesh Bannerjee

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>



--
"Danger. Ha. I laugh in the face of Danger - then hide until it
goes away." -- Xander, Buffy the Vampire Slayer

PGP Key: http://www.hex21.com/~binesh/binesh-public.asc
PGP Key fingerprint = 421D B4C2 2E96 B8EE 7190 A0CF B42F E71C 7FC3 AD96

SSH2 Key: http://www.hex21.com/~binesh/binesh-ssh2.pub
OpenSSH Key: http://www.hex21.com/~binesh/binesh-openssh.pub
BubbleBabble = xibeb-voges-havez-pabaf-debop-cylil-lelyc-viruv-bygeg-zotoh-dixex
Fingerprint = 9d:7c:84:5d:80:e3:65:8d:ee:9e:a3:b9:56:0a:e9:ad

SSH1 Key: http://www.hex21.com/~binesh/binesh-ssh1.pub

CipherKnight Seals:
http://www.hex21.com/~binesh/binesh-seal.tar.bz2.cs256
http://www.hex21.com/~binesh/binesh-seal.zip.cs256
http://www.hex21.com/~binesh/binesh-certificate.gif.cs256
Decrypt with CipherSaber2 N=256, Password="WelcomeJedi!" (No quotes)
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top