Eclipse Errors on XSD field “No resource type specified”

Unudgeamuntee

New Member
This is a follow up question on:How to set restriction on XSD for id attributesI use Eclipse. I created an XSD file with the answer code and I got these 3 errors:\[code\]error: Error: No resource type specified (at 'xpath' with value '@id'). fsm.xsd /test/res/xml line 24 Android AAPT Problemerror: Error: No resource type specified (at 'xpath' with value '@toState'). fsm.xsd /test/res/xml line 32 Android AAPT Problemerror: Error: No resource type specified (at 'xpath' with value '@fromState'). fsm.xsd /test/res/xml line 28 Android AAPT Problem\[/code\]An XML test file with XMLSchema-instance using the xsd validates OK, even with the 3 mentioned errors.
I want to know if these errors are just a glitch in Eclipse or is there something else I need to define to get rid of them.XSD source code:\[code\]<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="FSM"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" name="state"> <xs:complexType> <xs:attribute name="id" type="xs:unsignedByte" use="required"/> <xs:attribute name="name" type="xs:string" use="required"/> </xs:complexType> </xs:element> <xs:element name="transition"> <xs:complexType> <xs:attribute name="fromState" type="xs:unsignedByte" use="required"/> <xs:attribute name="toState" type="xs:unsignedByte" use="required"/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> <xs:key name="PKStates"> <xs:selector xpath="state"/> <xs:field xpath="@id"/> </xs:key> <xs:keyref name="FKTransitionToStatesFrom" refer="PKStates"> <xs:selector xpath="transition"/> <xs:field xpath="@fromState"/> </xs:keyref> <xs:keyref name="FKTransitionToStatesTo" refer="PKStates"> <xs:selector xpath="transition"/> <xs:field xpath="@toState"/> </xs:keyref> </xs:element></xs:schema>\[/code\]XML test file:\[code\]<?xml version="1.0" encoding="utf-8"?><FSM xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="fsm.xsd"> <state name="S1" id="1"/> <state name="S2" id="2"/> <state name="S3" id="3"/> <transition toState="1" fromState="2"/></FSM>\[/code\]
 
Back
Top