Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Schema attibute/complexType problem

Reply
Thread Tools

Schema attibute/complexType problem

 
 
steve_marjoribanks
Guest
Posts: n/a
 
      02-22-2006
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

 
Reply With Quote
 
 
 
 
monique
Guest
Posts: n/a
 
      02-22-2006
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

 
Reply With Quote
 
 
 
 
steve_marjoribanks
Guest
Posts: n/a
 
      02-22-2006
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with schema-validation and property "http://apache.org/xml/properties/schema/external-schemaLocation" Markus Java 1 11-23-2005 02:41 PM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
XML schema regular expressions question and recommended XML Schema book Fred Smith XML 1 02-05-2004 11:12 AM
Schema Metadata not a Metadata Schema Brett Selleck XML 1 09-04-2003 05:02 PM
Re: Convert DB2 schema to XML Schema Klaus Johannes Rusch XML 0 08-06-2003 11:23 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57