Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What's wrong with this attributeGroup Declaration?

 
Himal Chuli
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi folks,
i am trying to implement attributeGroup and i have the following schema:
--------------------------------------------------
xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="name">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="trans" type="xsd:string"/>
</xsd:sequence>
<xsd:attributeGroup ref="personAttr"/>
</xsd:complexType>
</xsd:element>
<xsd:attributeGroup name=" personAttr">
<xsd:attribute name="name" type="xsd:string"/>
<xsd:attribute name="test" type="xsd:string"/>
</xsd:attributeGroup>
</xsd:schema>
when i try validating it with XMLSpy,it says Schema error - attributeGroup 'personAttr' is undefined. what's wrong?
himal
 
Jayadev Pulaparty
Ranch Hand
Posts: 662
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<xsd:attributeGroup name=" personAttr">
I guess you need to get rid of the extra space here " personAttr" ----> as "personAttr"
 
Himal Chuli
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks jayadev for pointing out such mitake. so hard to notice at times.
himal
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!