Schema attibute/complexType problem

S

steve_marjoribanks

I have a section of a schema below and I've got a problem I can'y
figure out. I'm not having a good day though so it's probably just me
being stupid!! ;-)
I need the shearStrength element to have an xink:href attribute as
shown below but I also need it to have something like:

<extension base="float">
<attributeGroup ref="ags:UoMGroup" />
</extension>

ie. i need to restrict the value of shearStrength to a float value and
associate it with an attributeGroup I already have, as well as
including the xlink:href attribute.


<element name="layerMaterialParameters">
<complexType>
<sequence>
<element name="shearStrength">
<complexType>
<attribute ref="xlink:href" use="required"/>
</complexType>
</element>
<!-- other elements here -->
</sequence>
</complexType>
</element>



Any help would be much appreciated!

Steve
 
M

monique

Could it be this ?

<xs:element name="shearStrength">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:float">
<xs:attribute ref="xlink:href" use="required"/>
<xs:attributeGroup ref="ags:UoMGroup"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>

I'm still learnig about namespaces so I tested it without namespaces.
it's not enough, I now :)

Cheers

Monique
 
S

steve_marjoribanks

Yeah, after messing around in XMLSpy, I came up with that solution too.
:)

But somehow it doesn't seem that logical though (assuming it's right!)
having both the attribut and the attribute group which are unrelated
within the same 'float' extension?!
Ah well!

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top