XML Tutorial/XML Schema/whiteSpace

Материал из Web эксперт
Перейти к: навигация, поиск

whiteSpace Specifies how white space (tabs, line feeds, carriage returns, and spaces) is processed

   <source lang="xml">

<xsd:simpleType name="token">

 <xsd:restriction base="xsd:normalizedString">
  <xsd:whiteSpace value="collapse"/>
 </xsd:restriction>

</xsd:simpleType></source>


whiteSpace value="collapse"

   <source lang="xml">

<?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"

 targetNamespace="http://www.wbex.ru" xmlns="http://www.wbex.ru"
 elementFormDefault="qualified">
 <xs:simpleType name="token">
   <xs:restriction base="xs:normalizedString">
     <xs:whiteSpace value="collapse" />
   </xs:restriction>
 </xs:simpleType>

</xs:schema></source>


whiteSpace value="replace"

   <source lang="xml">

<?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"

 targetNamespace="http://www.wbex.ru" xmlns="http://www.wbex.ru"
 elementFormDefault="qualified">
 <xs:simpleType name="normalizedString">
   <xs:restriction base="xs:string">
     <xs:whiteSpace value="replace" />
   </xs:restriction>
 </xs:simpleType>

</xs:schema></source>