|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
||||
|
||||
|
attributes and elements -> enumeration
hi there
enumeration on elements are simple. on attributes as well. but how do i combine both? example 1: XML: enum on attribute ... PHP Code:
PHP Code:
i've played around with simple and complexType, simple and complexContent but it always caused an ERROR (in this case: "unexpected child element 'xsd:attribute' ") - so the following wont work PHP Code:
thanks for any hint tigercat |
|
#2
|
|||
|
|||
|
First, a disclaimer: I know next to nothing about xsd.
Now, it looked like you were missing a tag. Code:
<LOCATION lang="EN">city</LOCATION>
<xsd:simpleType name="LOCATION_TYPE">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="city"/>
<xsd:enumeration value="town"/>
</xsd:restriction>
<xsd:extension base="xsd:string"> <!-- missing this tag -->
<xsd:attribute name="lang" type="lang_TYPE"/>
</xsd:extension>
</xsd:simpleType>
__________________
-james |
|
#3
|
||||
|
||||
|
hi bricker,
thanks for your reply. but your hint didn't work. but there is a solution i found on my own that is that simple that i first didn't see. here it is. tigercat PHP Code:
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > attributes and elements -> enumeration |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|