Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Is xsd validator cannot validate an xpath with character [ or ] ?
Is xsd validator cannot validate an xpath with character [ or ] ? [message #604211] Thu, 28 May 2009 16:02
Toan is currently offline ToanFriend
Messages: 36
Registered: July 2009
Member
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>
Previous Topic:escaping chars in XSD
Next Topic:Is xsd validator cannot validate an xpath with character [ or ] ?
Goto Forum:
  


Current Time: Fri Dec 19 09:30:41 GMT 2014

Powered by FUDForum. Page generated in 0.11531 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software