Is xsd validator cannot validate an xpath with character [ or ] ? [message #604211] |
Thu, 28 May 2009 12:02 |
Eclipse User |
|
|
|
Hi everyone, is that xsd validator cannot validate an xml schema with an
xpath having character [ or ] ? I have this question because when I
validate a schema with xpath having predicates which are embedded in
square brackets (like the following), I have the problem. In the contrary,
I don't have. If yes, is there any way to introduce an xpath with
predicates without having problems in validating?
Thanks in advance.
Toan.
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="Model" type="Model">
<xsd:key name="EntityKey">
<xsd:selector xpath=".//*[entityName]" />
<xsd:field xpath=".//entityName" />
</xsd:key>
<xsd:keyref name="SourceRef" refer="EntityKey">
<xsd:selector xpath=".//*[Source]" />
<xsd:field xpath=".//Source" />
</xsd:keyref>
<xsd:keyref name="DestinationRef" refer="EntityKey">
<xsd:selector xpath=".//*[Destination]" />
<xsd:field xpath=".//Destination" />
</xsd:keyref>
</xsd:element>
<xsd:complexType name="Model">
<xsd:sequence>
<xsd:element default="model" minOccurs="0" name="modelNameElement"
type="xsd:string" />
<xsd:element default="documentation" minOccurs="0"
name="documentationElement" type="xsd:string" />
<xsd:element minOccurs="0" name="modelXSDFile" type="xsd:string"
/>
<xsd:element maxOccurs="unbounded" minOccurs="0"
name="BasicEntity" type="BasicEntity" />
<xsd:element maxOccurs="unbounded" minOccurs="0"
name="Communicator" type="Communicator" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="BasicEntity">
<xsd:sequence>
<xsd:element default="BasicEntity" minOccurs="0"
name="entityName" type="xsd:string" />
<xsd:element default="BasicEntity" minOccurs="0"
name="entityTypeName" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Communicator">
<xsd:sequence>
<xsd:element minOccurs="1" name="Destination"
type="xsd:string" />
<xsd:element minOccurs="1" name="Source" type="xsd:string"
/>
<xsd:element default="Communicator" minOccurs="0"
name="name"
type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
|
|
|
Powered by
FUDForum. Page generated in 0.04618 seconds