How to find out when an attribute is a ref or not? [message #36434] |
Thu, 22 January 2004 11:57 |
Eclipse User |
|
|
|
Originally posted by: niemaz.xrce.xerox.com
Hi,
I'm stuck with this problem : I'd like to find out when an attribute is a
reference (of type) or has real content ... tried everything I could
around isAttributeDeclarationReference() methods like but in vain ;-(
Any ideas?
Thanx,
--mike
<xs:simpleType name="st2">
<xs:restriction base="xs:string">
<xs:enumeration value="air"/>
<xs:enumeration value="land"/>
<xs:enumeration value="any"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="iti" type="st2" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>bla 111</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="utu">
<xs:complexType>
<xs:attribute name="att1" type="st2"/>
</xs:complexType>
</xs:element>
<xs:element name="loc">
<xs:complexType>
<xs:attribute name="at3">
<xs:simpleType name="st3">
<xs:restriction base="xs:string">
<xs:enumeration value="air"/>
<xs:enumeration value="land"/>
<xs:enumeration value="any"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
|
|
|
Re: How to find out when an attribute is a ref or not? [message #36525 is a reply to message #36434] |
Thu, 22 January 2004 13:51 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Mike,
If isAttributeDeclarationReference returns true, it's a reference, otherwise,
it's not. Similary, if x.getResolvedAttributeDeclaration returns something
other than x itself, it's a reference, otherwise, it's not. What are you
trying to do beyond that? (Note that there are no attribute references in
your sample below.)
mike wrote:
> Hi,
> I'm stuck with this problem : I'd like to find out when an attribute is a
> reference (of type) or has real content ... tried everything I could
> around isAttributeDeclarationReference() methods like but in vain ;-(
> Any ideas?
>
> Thanx,
>
> --mike
>
> <xs:simpleType name="st2">
> <xs:restriction base="xs:string">
> <xs:enumeration value="air"/>
> <xs:enumeration value="land"/>
> <xs:enumeration value="any"/>
> </xs:restriction>
> </xs:simpleType>
>
> <xs:element name="iti" type="st2" maxOccurs="unbounded">
> <xs:annotation>
> <xs:documentation>bla 111</xs:documentation>
> </xs:annotation>
> </xs:element>
>
> <xs:element name="utu">
> <xs:complexType>
> <xs:attribute name="att1" type="st2"/>
> </xs:complexType>
> </xs:element>
>
> <xs:element name="loc">
> <xs:complexType>
> <xs:attribute name="at3">
> <xs:simpleType name="st3">
> <xs:restriction base="xs:string">
> <xs:enumeration value="air"/>
> <xs:enumeration value="land"/>
> <xs:enumeration value="any"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:attribute>
> </xs:complexType>
> </xs:element>
|
|
|
Re: How to find out when an attribute is a ref or not? [message #583115 is a reply to message #36434] |
Thu, 22 January 2004 13:51 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Mike,
If isAttributeDeclarationReference returns true, it's a reference, otherwise,
it's not. Similary, if x.getResolvedAttributeDeclaration returns something
other than x itself, it's a reference, otherwise, it's not. What are you
trying to do beyond that? (Note that there are no attribute references in
your sample below.)
mike wrote:
> Hi,
> I'm stuck with this problem : I'd like to find out when an attribute is a
> reference (of type) or has real content ... tried everything I could
> around isAttributeDeclarationReference() methods like but in vain ;-(
> Any ideas?
>
> Thanx,
>
> --mike
>
> <xs:simpleType name="st2">
> <xs:restriction base="xs:string">
> <xs:enumeration value="air"/>
> <xs:enumeration value="land"/>
> <xs:enumeration value="any"/>
> </xs:restriction>
> </xs:simpleType>
>
> <xs:element name="iti" type="st2" maxOccurs="unbounded">
> <xs:annotation>
> <xs:documentation>bla 111</xs:documentation>
> </xs:annotation>
> </xs:element>
>
> <xs:element name="utu">
> <xs:complexType>
> <xs:attribute name="att1" type="st2"/>
> </xs:complexType>
> </xs:element>
>
> <xs:element name="loc">
> <xs:complexType>
> <xs:attribute name="at3">
> <xs:simpleType name="st3">
> <xs:restriction base="xs:string">
> <xs:enumeration value="air"/>
> <xs:enumeration value="land"/>
> <xs:enumeration value="any"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:attribute>
> </xs:complexType>
> </xs:element>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03267 seconds