(*
   $Id$
   ISO TC184/SC4/WG12 N4655 - ISO/CD-TS 10303-1001 Appearance assignment - EXPRESS MIM
   Supersedes ISO TC184/SC4/WG12 N4240
*) 


SCHEMA Appearance_assignment_mim;

USE FROM Elemental_geometric_shape_mim;    -- ISO/TS 10303-1004

USE FROM presentation_appearance_schema   -- ISO 10303-46
  (context_dependent_over_riding_styled_item,
   fill_area_style_colour,
   invisibility,
   over_riding_styled_item,
   presentation_style_assignment,
   presentation_style_by_context,
   style_context_select,
   styled_item);

USE FROM presentation_resource_schema   -- ISO 10303-46
   (planar_box);

USE FROM representation_schema   -- ISO 10303-43
  (mapped_item); 

  TYPE appearance_representation_identification_item = SELECT BASED_ON identification_item WITH 
    (representation);
  END_TYPE; 

  SUBTYPE_CONSTRAINT aa_representation_item_subtypes FOR representation_item;
    ONEOF (mapped_item,
      styled_item);
  END_SUBTYPE_CONSTRAINT;

  RULE styled_curve FOR (styled_item);
    WHERE
      WR1: SIZEOF( QUERY( si <* styled_item | ('APPEARANCE_ASSIGNMENT_MIM.CURVE' IN TYPEOF (si.item)) AND (SIZEOF (QUERY (psa <* si.styles | (SIZEOF (QUERY (cs <* psa.styles | ('APPEARANCE_ASSIGNMENT_MIM.CURVE_STYLE' IN TYPEOF (cs)) )) > 0) )) <> 1) )) = 0;
  END_RULE; 

END_SCHEMA; 
