BizTalk Server Applications Integration - xml schema question

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Applications Integration > April 2004 > xml schema question





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author xml schema question
Tim B

2004-03-18, 2:00 pm

I have the following type in use in a schema I've developed.

<xs:complexType name="Numeric"><xs:simpleContent><xs:extension base="xs:nonNegativeInteger"><xs:attribute name="Precision" type="xs:unsignedShort" use="required" /></xs:extension></xs:simpleContent></xs:complexType>

I would also like to apply a restriction on the number of digits allowed. I can see how to do this in a simple example, but also being able to keep the precision attribute within the type has me baffled. Any ideas ?

Tim


Everett Yang

2004-03-20, 9:23 pm

I will look into this and get back to you soon.

Thanks.

Sincerely,


Everett Yang
DSI - Microsoft BizTalk Server

This posting is provided “AS IS” with no warranties, and confers no rights.
Subscribe at
http://support.microsoft.com/defaul...msdn/nospam.asp
&SD=msdn

Everett Yang

2004-03-31, 5:39 pm

Hi Tim,

Sorry for the delay.

Let me make sure I understand the issue. What does your schema look like
currently? Please attach an example. What type would you like Precision
to be?

Sincerely,


Everett Yang
DSI - Microsoft BizTalk Server

This posting is provided “AS IS” with no warranties, and confers no rights.
Subscribe at
http://support.microsoft.com/defaul...msdn/nospam.asp
&SD=msdn

Tim B

2004-04-06, 10:50 am

Everett,

I solved this issue by creating a simpletype that has the restrictions I wanted, then extending that in a complex type which adds the attribute I wanted.

Thanks
Tim

<xs:simpleType name="NumericSimple"><xs:restriction base="xs:nonNegativeInteger"><xs:minInclusive value="1" /><xs:totalDigits value="5" /></xs:restriction></xs:simpleType><xs:complexType name="Numeric"><xs:simpleContent><xs:extension base="NumericSimple">
<xs:attribute name="Precision" type="xs:unsignedShort" use="required" /></xs:extension></xs:simpleContent></xs:complexType>
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com