[prev in list] [next in list] [prev in thread] [next in thread]
List: xmlbeans-user
Subject: RE: Key 'Yes' not found for keyref constraint ...
From: "Radu Preotiuc-Pietro" <radup () bea ! com>
Date: 2005-11-24 1:42:21
Message-ID: 4B2B4C417991364996F035E1EE39E2E1037090FB () uskiex01 ! amer ! bea ! com
[Download RAW message or body]
I think your problem lies in the fact that keyref
"TotalFundForAttachedKeyPersonsExistKeyRef2" doesn't in fact refer to
key "TotalFundForAttachedKeyPersonsExistKey" as you seem to be thinking,
but to "TotalFundForAttacheKeyPersonsExistKey2", so it looks for the
element "AttachedKeyPersons", which is in fact missing....
Radu
_____
From: Samuel B. Quiring [mailto:sbq@Cayuse.com]
Sent: Wednesday, November 23, 2005 7:35 AM
To: user@xmlbeans.apache.org
Subject: Re: Key 'Yes' not found for keyref constraint ...
I want to clarify one item in the email below: The 'validation error'
comes from calling:
org.apache.xmlbeans.XmlObject.validate().
We call this routine all over in our code, it is great for debugging.
This is the first time
we've been totally stumped.
----- Original Message -----
From: Samuel B. Quiring <mailto:sbq@Cayuse.com>
To: user@xmlbeans.apache.org
Sent: Tuesday, November 22, 2005 3:09 PM
Subject: Key 'Yes' not found for keyref constraint ...
I'm getting a validation error on the XML generated for the
schema snippet below:
validationError: error: cvc-identity-constraint.4.3: Key 'Yes'
not found for keyref constraint
'TotalFundForAttachedKeyPersonsExistKeyRef2@http://apply.grants.gov/form
s/RR_Budget-V1.0'
<mailto:'TotalFundForAttachedKeyPersonsExistKeyRef2@http://apply.grants.
gov/forms/RR_Budget-V1.0'>
Does anyone have any idea what this means? I've been trying to
figure this out for a couple of hours. Here is the relevant XML that is
generated:
_____
<rr:FundsRequested>40</rr:FundsRequested>
<rr:BaseSalary>90</rr:BaseSalary>
</rr:Compensation>
</rr:KeyPerson>
<rr:TotalFundForAttachedKeyPersons
rr:TotalFundForAttachedKeyPersonsExist="Yes">101</rr:TotalFundForAttache
dKeyPersons>
<rr:TotalFundForKeyPersons>51</rr:TotalFundForKeyPersons>
</rr:KeyPersons>
_____
Schema Snippet
(http://apply.grants.gov/forms/schemas/RR_Budget-V1.0.xsd)
<xs:schema
xmlns:RR_Budget="http://apply.grants.gov/forms/RR_Budget-V1.0"
xmlns:att="http://apply.grants.gov/system/Attachments-V1.0"
xmlns:globLib="http://apply.grants.gov/system/GlobalLibrary-V1.0"
. . .
<xs:import
namespace="http://apply.grants.gov/system/Global-V1.0"
schemaLocation="http://apply.grants.gov/system/schemas/Global-V1.0.xsd"
/>
. . .
<xs:element name="KeyPersons">
<xs:complexType>
<xs:sequence>
<xs:element name="KeyPerson"
type="RR_Budget:KeyPersonDataType" maxOccurs="8"/>
<xs:element name="TotalFundForAttachedKeyPersons"
minOccurs="0">
<xs:complexType>
<xs:simpleContent>
<xs:extension
base="glob:DecimalMin1Max15Places2Type">
<xs:attribute
name="TotalFundForAttachedKeyPersonsExist" type="globLib:YesNoDataType"
use="required" fixed="Yes"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="TotalFundForKeyPersons"
type="glob:DecimalMin1Max15Places2Type"/>
<xs:element name="AttachedKeyPersons" minOccurs="0">
<xs:complexType>
<xs:complexContent>
<xs:extension
base="att:AttachedFileDataType">
<xs:attribute
name="TotalFundForAttachedKeyPersonsExist" type="globLib:YesNoDataType"
use="required" fixed="Yes"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:key name="TotalFundForAttachedKeyPersonsExistKey">
<xs:selector
xpath="./RR_Budget:TotalFundForAttachedKeyPersons"/>
<xs:field
xpath="@RR_Budget:TotalFundForAttachedKeyPersonsExist"/>
</xs:key>
<xs:keyref name="TotalFundForAttachedKeyPersonsExistKeyRef"
refer="RR_Budget:TotalFundForAttachedKeyPersonsExistKey">
<xs:selector xpath="./RR_Budget:AttachedKeyPersons"/>
<xs:field
xpath="@RR_Budget:TotalFundForAttachedKeyPersonsExist"/>
</xs:keyref>
<xs:key name="TotalFundForAttachedKeyPersonsExistKey2">
<xs:selector xpath="./RR_Budget:AttachedKeyPersons"/>
<xs:field
xpath="@RR_Budget:TotalFundForAttachedKeyPersonsExist"/>
</xs:key>
<xs:keyref name="TotalFundForAttachedKeyPersonsExistKeyRef2"
refer="RR_Budget:TotalFundForAttachedKeyPersonsExistKey2">
<xs:selector
xpath="./RR_Budget:TotalFundForAttachedKeyPersons"/>
<xs:field
xpath="@RR_Budget:TotalFundForAttachedKeyPersonsExist"/>
</xs:keyref>
</xs:element>
From globLib
(http://apply.grants.gov/system/schemas/Global-V1.0.xsd
<http://apply.grants.gov/system/schemas/Global-V1.0.xsd> )
<xs:simpleType name="YesNoDataType">
<xs:restriction base="xs:string">
<xs:enumeration value="Yes"/>
<xs:enumeration value="No"/>
</xs:restriction>
</xs:simpleType>
[Attachment #3 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1491" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=395562701-24112005>I think your problem lies in the fact that keyref
"TotalFundForAttachedKeyPersonsExistKeyRef2" doesn't in fact refer to key
"TotalFundForAttachedKeyPersonsExistKey" as you seem to be thinking, but to
"TotalFundForAttacheKeyPersonsExistKey<STRONG>2</STRONG>", so it looks for the
element "AttachedKeyPersons", which is in
fact missing....</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=395562701-24112005></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=395562701-24112005>Radu</SPAN></FONT></DIV><FONT face=Arial color=#0000ff
size=2></FONT><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Samuel B. Quiring [mailto:sbq@Cayuse.com]
<BR><B>Sent:</B> Wednesday, November 23, 2005 7:35 AM<BR><B>To:</B>
user@xmlbeans.apache.org<BR><B>Subject:</B> Re: Key 'Yes' not found for keyref
constraint ...<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2>I want to clarify one item in the email
below: The 'validation error' comes from calling:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>org.apache.xmlbeans.XmlObject.validate().</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>We call this routine all over in our code, it is
great for debugging. This is the first time</FONT></DIV>
<DIV><FONT face=Arial size=2>we've been totally stumped.</FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 \
2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">----- Original Message \
----- </DIV> <DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=sbq@Cayuse.com href="mailto:sbq@Cayuse.com">Samuel B. Quiring</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=user@xmlbeans.apache.org
href="mailto:user@xmlbeans.apache.org">user@xmlbeans.apache.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, November 22, 2005 3:09
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Key 'Yes' not found for keyref
constraint ...</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT><FONT face=Arial
color=#0000ff size=2></FONT><BR></DIV>
<DIV><FONT face=Arial size=2>I'm getting a validation error on the XML
generated for the schema snippet below:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><FONT color=#ff0000 size=2>validationError:
error: cvc-identity-constraint.4.3: Key 'Yes' not found for keyref constraint
<A
href="mailto:'TotalFundForAttachedKeyPersonsExistKeyRef2@http://apply.grants.gov/for \
ms/RR_Budget-V1.0'">'<STRONG>TotalFundForAttachedKeyPersonsExistKeyRef2</STRONG>@http://apply.grants.gov/forms/RR_Budget-V1.0'</A></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT size=2><FONT
color=#0000ff></FONT> </DIV></FONT></FONT>
<DIV><FONT face=Arial size=2>Does anyone have any idea what this means?
I've been trying to figure this out for a couple of hours. Here is the
relevant XML that is generated:</FONT></DIV>
<DIV><FONT face=Arial size=2>
<HR>
</FONT></DIV>
<DIV><FONT face=Arial size=2>
<rr:FundsRequested>40</rr:FundsRequested><BR>
<rr:BaseSalary>90</rr:BaseSalary><BR>
</rr:Compensation><BR> </rr:KeyPerson><BR>
<rr:TotalFundForAttachedKeyPersons rr:<FONT
color=#ff0000>TotalFundForAttachedKeyPersonsExist</FONT>="Yes">101</rr:TotalFundForAttachedKeyPersons><BR> \
<rr:TotalFundForKeyPersons>51</rr:TotalFundForKeyPersons><BR></rr:KeyPersons><BR>
<HR>
</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><STRONG><U>Schema Snippet (<A
href="http://apply.grants.gov/forms/schemas/RR_Budget-V1.0.xsd">http://apply.grants.gov/forms/schemas/RR_Budget-V1.0.xsd</A>)</U></STRONG></FONT></DIV>
<DIV><FONT face=Arial size=2> <xs:schema xmlns:RR_Budget="<A
href="http://apply.grants.gov/forms/RR_Budget-V1.0">http://apply.grants.gov/forms/RR_Budget-V1.0</A>"<BR> \
xmlns:att="<A
href="http://apply.grants.gov/system/Attachments-V1.0">http://apply.grants.gov/system/Attachments-V1.0</A>"<BR> \
xmlns:globLib="<A
href="http://apply.grants.gov/system/GlobalLibrary-V1.0">http://apply.grants.gov/system/GlobalLibrary-V1.0</A>" \
<BR> . . .<BR><xs:import namespace="<A
href="http://apply.grants.gov/system/Global-V1.0">http://apply.grants.gov/system/Global-V1.0</A>"<BR> \
schemaLocation="<A
href="http://apply.grants.gov/system/schemas/Global-V1.0.xsd">http://apply.grants.gov/system/schemas/Global-V1.0.xsd</A>" \
/> </FONT></DIV>
<DIV><FONT face=Arial size=2> . . .</FONT></DIV>
<DIV><FONT face=Arial size=2><xs:element
name="KeyPersons"><BR>
<xs:complexType><BR>
<xs:sequence><BR> \
<xs:element name="KeyPerson" type="RR_Budget:KeyPersonDataType"
maxOccurs="8"/><BR> \
<xs:element name="<FONT
color=#0000ff>TotalFundForAttachedKeyPersons</FONT>"
minOccurs="0"><BR> \
<xs:complexType><BR> \
<xs:simpleContent><BR> &n \
bsp; \
<xs:extension base="glob:DecimalMin1Max15Places2Type"><BR> &n \
bsp; \
<xs:attribute name="<FONT
color=#ff0000>TotalFundForAttachedKeyPersonsExist</FONT>" type="<FONT
color=#800080>globLib:YesNoDataType</FONT>" use="required"
fixed="Yes"/><BR> \
</xs:extension><BR> \
</xs:simpleContent><BR> \
</xs:complexType><BR> \
</xs:element><BR> \
<xs:element name="TotalFundForKeyPersons"
type="glob:DecimalMin1Max15Places2Type"/><BR> \
<xs:element name="AttachedKeyPersons"
minOccurs="0"><BR> \
<xs:complexType><BR> \
<xs:complexContent><BR> & \
nbsp; \
<xs:extension base="att:AttachedFileDataType"><BR> &nbs \
p; \
<xs:attribute name="<FONT color=#ff0000><FONT
color=#000000>TotalFundForAttachedKeyPersonsExist</FONT>"</FONT>
type="globLib:YesNoDataType" use="required"
fixed="Yes"/><BR> \
</xs:extension><BR> \
</xs:complexContent><BR> \
</xs:complexType><BR> \
</xs:element><BR>
</xs:sequence><BR>
</xs:complexType><BR> <xs:key
name="TotalFundForAttachedKeyPersonsExistKey"><BR> \
<xs:selector xpath="./RR_Budget:<FONT
color=#0000ff>TotalFundForAttachedKeyPersons</FONT>"/><BR> \
<xs:field
xpath="@RR_Budget:TotalFundForAttachedKeyPersonsExist"/><BR>
</xs:key><BR> <xs:keyref
name="TotalFundForAttachedKeyPersonsExistKeyRef"
refer="RR_Budget:TotalFundForAttachedKeyPersonsExistKey"><BR> \
<xs:selector
xpath="./RR_Budget:AttachedKeyPersons"/><BR> \
<xs:field
xpath="@RR_Budget:TotalFundForAttachedKeyPersonsExist"/><BR>
</xs:keyref><BR> <xs:key
name="TotalFundForAttachedKeyPersonsExistKey2"><BR> \
<xs:selector
xpath="./RR_Budget:AttachedKeyPersons"/><BR> \
<xs:field
xpath="@RR_Budget:TotalFundForAttachedKeyPersonsExist"/><BR>
</xs:key><BR> <xs:keyref name="<STRONG><FONT
color=#ff0000>TotalFundForAttachedKeyPersonsExistKeyRef2</FONT></STRONG>"
refer="RR_Budget:TotalFundForAttachedKeyPersonsExistKey2"><BR> \
<xs:selector xpath="./RR_Budget:<FONT
color=#0000ff>TotalFundForAttachedKeyPersons</FONT>"/><BR> \
<xs:field
xpath="@RR_Budget:TotalFundForAttachedKeyPersonsExist"/><BR>
</xs:keyref><BR></xs:element></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><STRONG><U>From globLib (</U></STRONG><A
href="http://apply.grants.gov/system/schemas/Global-V1.0.xsd"><STRONG>http://apply.g \
rants.gov/system/schemas/Global-V1.0.xsd</STRONG></A><STRONG><U>)</U></STRONG></FONT></DIV>
<DIV><FONT face=Arial size=2><xs:simpleType name="<FONT
color=#800080>YesNoDataType</FONT>"><BR> <xs:restriction
base="xs:string"><BR> <xs:enumeration
value="Yes"/><BR> <xs:enumeration
value="No"/><BR>
</xs:restriction><BR></xs:simpleType></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BLOCKQUOTE></BODY></HTML>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic