Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsgetFacets() Vs getFacetContents()
https://www.eclipse.org/forums/index.php/mv/msg/21226/68109/#msg_68109
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"
Gili]]>2006-05-11T05:57:40-00:00Re: getFacets() Vs getFacetContents()
https://www.eclipse.org/forums/index.php/mv/msg/21226/68123/#msg_68123
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
>]]>2006-05-11T10:03:02-00:00Re: getFacets() Vs getFacetContents()
https://www.eclipse.org/forums/index.php/mv/msg/21226/598081/#msg_598081
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 Merks2006-05-11T10:03:02-00:00Re: getFacets() Vs getFacetContents()
https://www.eclipse.org/forums/index.php/mv/msg/21226/68136/#msg_68136
Originally posted by: gilado74.gmail.com
Ed,
Thanks for the clarification.]]>2006-05-11T13:39:07-00:00Re: getFacets() Vs getFacetContents()
https://www.eclipse.org/forums/index.php/mv/msg/21226/598087/#msg_598087
Originally posted by: gilado74.gmail.com
Ed,
Thanks for the clarification.]]>2006-05-11T13:39:07-00:00