XML/XML Schema/anyAttribute
xsd:anyAttribute and processContents="lax": valid if a declaration exists
<source lang="xml">
File: Data.xml <?xml version="1.0"?> <person xmlns="http://www.wbex.ru"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wbex.ru Schema.xsd" id1="id1" id2="id2" id3="id3" id4="id4" > <firstname> </firstname> <lastname/>
</person>
File: Schema.xsd <?xml version="1.0"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.wbex.ru" xmlns="http://www.wbex.ru" elementFormDefault="qualified"> <xsd:element name="person"> <xsd:complexType> <xsd:sequence> <xsd:element name="firstname" type="xsd:string"/> <xsd:element name="lastname" type="xsd:string"/> </xsd:sequence> <xsd:anyAttribute processContents="lax"/> </xsd:complexType> </xsd:element>
</xsd:schema>
</source>
xsd:anyAttribute and processContents="skip": it only needs top be well-formed
<source lang="xml">
File: Data.xml <?xml version="1.0"?> <person xmlns="http://www.wbex.ru"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wbex.ru Schema.xsd" id1="id1" id2="id2" id3="id3" id4="id4" > <firstname> </firstname> <lastname/>
</person>
File: Schema.xsd <?xml version="1.0"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.wbex.ru" xmlns="http://www.wbex.ru" elementFormDefault="qualified"> <xsd:element name="person"> <xsd:complexType> <xsd:sequence> <xsd:element name="firstname" type="xsd:string"/> <xsd:element name="lastname" type="xsd:string"/> </xsd:sequence> <xsd:anyAttribute processContents="skip"/> </xsd:complexType> </xsd:element>
</xsd:schema>
</source>