Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » XSD » No resource type specified (at 'xpath' with value '@id')(Error that prevents project comiplation)
No resource type specified (at 'xpath' with value '@id') [message #1046642] Mon, 22 April 2013 03:19
John Smith is currently offline John Smith
Messages: 1
Registered: April 2013
Junior Member
When using keys and keyrefs like this

        
        <xs:key name="PKStates">
            <xs:selector xpath="state"/>
            <xs:field xpath="@id"/>
        </xs:key>
        <xs:keyref name="FKTransitionStatesFrom"  refer="PKStates">
            <xs:selector xpath="transition"/>
            <xs:field xpath="@fromState"/>
        </xs:keyref>
        <xs:keyref name="FKTransitionStatesTo" refer="PKStates">
            <xs:selector xpath="transition"/>
            <xs:field xpath="@toState"/>
        </xs:keyref>


I get a bunch of errors:
No resource type specified (at 'xpath' with value '@id'). fsm.xsd /test/res/xml line 30 Android AAPT Problem
No resource type specified (at 'xpath' with value '@fromState'). fsm.xsd /test/res/xml line 42 Android AAPT Problem
No resource type specified (at 'xpath' with value '@toState'). fsm.xsd /test/res/xml line 46 Android AAPT Problem


The XSD syntax is valid, XML files get validated OK. But these errors, being within the res folder of an android project prevents the java code to compile successfully.

It turns out that prefixing xpath with .// (e.g.
<xs:field xpath=".//@id"/>
) does eliminate the error. Still the former syntax should be accepted as well, since it is correctly formed according to the BNF declaration of the field type (www.w3.org/TR/2009/WD-xmlschema11-1-20091203/#c-fields-xpaths)

[Updated on: Mon, 22 April 2013 09:13]

Report message to a moderator

Previous Topic:XSDEcoreBuilder: containments transient?
Next Topic:Problems with complexType?
Goto Forum:
  


Current Time: Fri Aug 29 08:17:36 EDT 2014

Powered by FUDForum. Page generated in 0.02021 seconds