user1006544
user1006544

Reputation: 1524

How to create xsd which can preserve formatted text?

I want to create XML Schema which can preserve formatted text Like, Line break , extra space ...

Upvotes: 1

Views: 273

Answers (1)

user1006544
user1006544

Reputation: 1524

you mean you wannt to create xml schema that can preserve the space in xml , If that is the question then here is the ans below

The element which you want to preserve the space just create your own data type for that element. For Ex:-

 <xs:simpleType name="TitleString"> 
   <xs:restriction base="xs:string"> 
     <xs:whiteSpace value="preserve"/> 
       <xs:minLength value="5"/> 
       <xs:maxLength value="230"/> 
   </xs:restriction> 
 </xs:simpleType>

and use this type in your element . tell me if you find any prob.

Upvotes: 1

Related Questions