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
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.

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="">
<xsd:element name="Model" type="Model">
<xsd:key name="EntityKey">
<xsd:selector xpath=".//*[entityName]" />
<xsd:field xpath=".//entityName" />
<xsd:keyref name="SourceRef" refer="EntityKey">
<xsd:selector xpath=".//*[Source]" />
<xsd:field xpath=".//Source" />
<xsd:keyref name="DestinationRef" refer="EntityKey">
<xsd:selector xpath=".//*[Destination]" />
<xsd:field xpath=".//Destination" />
<xsd:complexType name="Model">
<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:complexType name="BasicEntity">
<xsd:element default="BasicEntity" minOccurs="0"
name="entityName" type="xsd:string" />
<xsd:element default="BasicEntity" minOccurs="0"
name="entityTypeName" type="xsd:string" />
<xsd:complexType name="Communicator">
<xsd:element minOccurs="1" name="Destination"
type="xsd:string" />
<xsd:element minOccurs="1" name="Source" type="xsd:string"
<xsd:element default="Communicator" minOccurs="0"
type="xsd:string" />
Previous Topic:escaping chars in XSD
Next Topic:Is xsd validator cannot validate an xpath with character [ or ] ?
Goto Forum:

Current Time: Tue Sep 19 13:42:00 GMT 2017

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

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