Schema: unknown attribute 'name' on relationship tag

Please support our XML, XSLT and XPATH advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2007
Posts: 6
Reputation: n2201 is an unknown quantity at this point 
Solved Threads: 0
n2201 n2201 is offline Offline
Newbie Poster

Schema: unknown attribute 'name' on relationship tag

 
0
  #1
Jun 5th, 2008
I am trying to load XML files into SQL server database using SQLXML4.0

I have relation defined as such:
XML, XSLT and XPATH Syntax (Toggle Plain Text)
  1. <xs:annotation>
  2. <xs:appinfo>
  3. <sql:relationship name="ApplicantPhone"
  4. parent="Applicant"
  5. parent-key="PQNumber"
  6. child="Phone"
  7. child-key="PQNumber" />
  8. </xs:appinfo>
  9. </xs:annotation>

and then I am using the relations as follows:
XML, XSLT and XPATH Syntax (Toggle Plain Text)
  1. <xs:element minOccurs="0" maxOccurs="unbounded" name="CustPhone" sql:relation="Phone" sql:relationship="ApplicantPhone">
  2. <xs:complexType>
  3. <xs:sequence>
  4. <xs:element minOccurs="1" maxOccurs="1" name="Area" type="xs:string" sql:field="Area"/>
  5. <xs:element minOccurs="1" maxOccurs="1" name="Exchange" type="xs:string" sql:field="Exchange"/>
  6. <xs:element minOccurs="1" maxOccurs="1" name="Number" type="xs:string" sql:field="Number"/>
  7. <xs:element minOccurs="0" maxOccurs="1" name="Extension" type="xs:string" sql:field="Extension"/>
  8. </xs:sequence>
  9. </xs:complexType>
  10. </xs:element>


When I run my vbs script to import the XML I get the error:
Result State="FAILED"
HResult=0x80004005
Description=Schema: unknown attribute 'name' on relationship tag.
Source=Schema mapping
Type=FATAL


I would appreaciate your suggestion on fixing this issue.

Thanks
Last edited by n2201; Jun 5th, 2008 at 12:42 pm.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 6
Reputation: n2201 is an unknown quantity at this point 
Solved Threads: 0
n2201 n2201 is offline Offline
Newbie Poster

Re: Schema: unknown attribute 'name' on relationship tag

 
0
  #2
Jun 5th, 2008
I figured out. I was not using the correct table name in the relation. The error message sucks :-(
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the XML, XSLT and XPATH Forum
Thread Tools Search this Thread



Tag cloud for XML, XSLT and XPATH
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC