Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » getFacets() Vs getFacetContents()
getFacets() Vs getFacetContents() [message #68109] Thu, 11 May 2006 05:57 Go to next message
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 Go to previous messageGo to next message
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 #68136 is a reply to message #68123] Thu, 11 May 2006 13:39 Go to previous message
Eclipse User
Originally posted by: gilado74.gmail.com

Ed,
Thanks for the clarification.
Re: getFacets() Vs getFacetContents() [message #598081 is a reply to message #68109] Thu, 11 May 2006 10:03 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26141
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
>
Re: getFacets() Vs getFacetContents() [message #598087 is a reply to message #68123] Thu, 11 May 2006 13:39 Go to previous message
Eclipse User
Originally posted by: gilado74.gmail.com

Ed,
Thanks for the clarification.
Previous Topic:getFacets() Vs getFacetContents()
Next Topic:One element -> multiple types ?
Goto Forum:
  


Current Time: Sun Oct 26 04:20:45 GMT 2014

Powered by FUDForum. Page generated in 0.02135 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software