getFacets() Vs getFacetContents() [message #68109] |
Thu, 11 May 2006 05:57 |
Eclipse User |
|
|
|
Originally posted by: gilado74.gmail.com
HI,
What is the difference between getFacets() and getFacetContents()?
In what cases i would like to use the getFacets()function instet of
getFacetContents() and vice versa ?
As i notice, for the following XSD
the getFacetContents() returns only the "XSDPatternFacetImpl"
while the the getFacets() return "XSDPatternFacetImpl" and
"XSDWhiteSpaceFacetImpl"
<xs:simpleType name="myPatern">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/ >
</xs:restriction>
</xs:simpleType>
Gili
|
|
|
Re: getFacets() Vs getFacetContents() [message #68123 is a reply to message #68109] |
Thu, 11 May 2006 10:03 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Gili,
The first one will return all facets that are in effect based on
inheritance while the second one will return those facets physically
present in the given type. You'd use the former if you want to know all
the constraints that apply, and the later if you want to understand
where in the hierarchy the constraints are being specified and for
editing those constraints; since the first one is computed from the
second one, only the second one can be edited directly.
Gili wrote:
> HI,
> What is the difference between getFacets() and getFacetContents()?
> In what cases i would like to use the getFacets()function instet of
> getFacetContents() and vice versa ?
>
> As i notice, for the following XSD the getFacetContents() returns only
> the "XSDPatternFacetImpl" while the the getFacets() return
> "XSDPatternFacetImpl" and "XSDWhiteSpaceFacetImpl"
> <xs:simpleType name="myPatern">
> <xs:restriction base="xs:string">
> <xs:pattern
> value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/ >
> </xs:restriction>
> </xs:simpleType>
>
> Gili
>
|
|
|
|
Re: getFacets() Vs getFacetContents() [message #598081 is a reply to message #68109] |
Thu, 11 May 2006 10:03 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Gili,
The first one will return all facets that are in effect based on
inheritance while the second one will return those facets physically
present in the given type. You'd use the former if you want to know all
the constraints that apply, and the later if you want to understand
where in the hierarchy the constraints are being specified and for
editing those constraints; since the first one is computed from the
second one, only the second one can be edited directly.
Gili wrote:
> HI,
> What is the difference between getFacets() and getFacetContents()?
> In what cases i would like to use the getFacets()function instet of
> getFacetContents() and vice versa ?
>
> As i notice, for the following XSD the getFacetContents() returns only
> the "XSDPatternFacetImpl" while the the getFacets() return
> "XSDPatternFacetImpl" and "XSDWhiteSpaceFacetImpl"
> <xs:simpleType name="myPatern">
> <xs:restriction base="xs:string">
> <xs:pattern
> value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/ >
> </xs:restriction>
> </xs:simpleType>
>
> Gili
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03289 seconds