A general ontology for the final stage of static presentation of concrete elements,
i.e., for document/window element formatting

Dr Ph. MARTIN

This document mixes HTML and FL (a KRL, i.e., a Knowledge Representation Language; it is here used in the preformatted text parts). It is an input+backup+presentation file for the Multi-Source Ontology (MSO). The MSO  i) aligns and extends several ontologies, and  ii) can be extended by Web users via the shared KB server WebKB-2 and its shared KB (knowlege base) editing protocols.
In this document, "/^" is used instead of "<" (lien supertype) and "\." is used instead of ">" (lien subtype).

The ontology in this document is original and in construction.
It is part of complementary "ontologies on formal languages".
It is also part of a plan to allow the building of "interfaces/documents that can be fully parameterised by their users".


Table of contents 0. Top-level ontology 1. Visual presentation characteristic/attribute/measure 1.1. Document presentation related characteristic/attribute/measure 1.1.1. Margin/border related characteristic/attribute/measure 1.1.2. Color related characteristic/attribute/measure 1.2. Window related characteristic/attribute/measure 2. Aural presentation characteristic/attribute/measure



0.  Top-level ontology

The uppermost types below are from the uppermost ontology of structures for KRL models.

0.1. Relations between concrete elements

When XML/HTML + CSS is used for specifying structural+presentation constraints, some presetation constraints are directly derived from the XML/HTML content (instead of solely the CSS specfications), e.g., the relative spatial ordering of concrete elements is derived from their father-child relationship or their place with a list in the DOM. This is why XSLT is also often needed for presentation purpose only. In other words, XML/HTML elements are at least partially concrete. If XML is used as a notation for a KRL, the XML elements are fully concrete.

spatial_relation  \. (relative_position_to_other_cTerm \. ct_before);

0.2. Formatting characteristics/attributes/measures

pm#formatting_characteristic-or-attribute-or-measure  /^ pm#attr_or_chrc,
  \. partition
     { pm#structure-related_formatting_characteristic-or-attribute-or-measure //XML,XSLT,...
                 //content (list/table/tree/...) + selection handle + associated menu
       pm#event_related_formatting_characteristic-or-attribute-or-measure //E, Javascript
       (pm#presentation_related_formatting_characteristic-or-attribute-or-measure //CSS,forms
         \. partition  //position, margin, visibility, color, font, ...
            { (pm#visual-presentation_characteristic-or-attribute-or-measure  
                \. pm#document-element_related_visual-presentation_characteristic-or-attribute-or-measure
                   pm#window_related_visual-presentation_characteristic-or-attribute-or-measure  //frame, pop-up
              )
              pm#aural-presentation_characteristic-or-attribute-or-measure 
            } )
     };

0.3. Description instruments

pm#description_instrument
 \. (pm#document-element_description-instrument
      \. document_tree
         (pm#document-element_presentation_description-instrument
           \. css2#selector   css2#formatting_structure
              css2#visual_formatting_model
              (css2#style_sheet
                 pm#part: css2#selector 
              )
         )
   );

/* Notes of 2024-07-06:
- previous update: 2021-10-30 
- HTML (https://dev.w3.org/html5/spec-LC/), boxes, italic/bold/uppercase/... characters/fonts/...
    should be in this section; ~/public_html/cours/md/3td_reprEncodageChar/3td_reprEncodageChar_sol.html
- CSS/JS event representations as concept classes are here as event_repr_instrument
- CSS selectors are here as state repr
- CSS box part/margins are here as spatial_entity repr (used as rel.) are here
- CSS attributes (color, font-weight, height, ...; used as rel.) and their values are here as attribute repr
  and hence should NOT be in section 1 (they currently are)
- + /docElemType: CSS_attribute_for_any_DE, CSS_attribute_for_any_textuel_DE, ...
- CSS all: https://www.w3.org/TR/CSS/#css = https://www.w3.org/TR/css-2023/
     bulk (and index): https://www.w3.org/TR/2009/CR-CSS2-20090908/  the rest are "revisions"
*/

0.4. pm#physical_medium

pm#physical_medium _(pm#thing -> 0..* pm#physical_medium)
 \. (pm#physical_medium_of_something _(pm#thing -> 1..* pm#physical_medium)
      \. pm#physical_medium_of_process _(pm#process -> 1..* pm#physical_medium)
         (pm#physical_medium_of_description_content/instrument/container
            _(pm#description_content/instrument/container -> 1..* pm#physical_medium)
           \. pm#physical_medium_of_container
                _(pm#description_container -> 1..* pm#physical_medium)
         )
    )
    (pm#formatting-structure_physical-medium
      \. css2#viewport
         (css2#canvas 
            pm#part: css2#viewport )
    )
    (pm#user_interface
    )
    (css2#medium
       \. css2#medium#all _(^ medium suitable for all devices ^)
          css2#medium#braille _(^ medium intended for braille tactile feedback devices ^) 
          css2#medium#embossed _(^ medium intended for paged braille printers ^) 
          css2#medium#handheld _(^ medium intended for handheld devices
                                   with typically small screen and limited bandwidth ^) 
          css2#medium#print _(^ medium intended for paged material and for documents viewed
                               on screen in print preview mode ^)
          css2#medium#projection _(^ medium intended for projected presentations,
                                     e.g., projectors ^)
          css2#medium#screen _(^ medium intended primarily for color computer screens ^) 
          css2#medium#speech _(^ medium intended for speech synthesizers ^)
          css2#medium#tty _(^ medium intended for media using a fixed-pitch character grid,
                              e.g., teletypes, terminals, or portable devices with limited
                              display capabilities ^)
          css2#medium#tv _(^ medium intended for television-type devices, i.e., with
                             low resolution, color, limited-scrollability screens,
                             sound available ^) 
    )
    (css2#medium#visual-or-aural-or-tactile_medium
      \. (css2#medium#visual_medium
           \. css2#medium#projection  css2#medium#screen  css2#medium#tv
              css2#medium#tty  css2#medium#print )
         (css2#medium#aural_medium   \. css2#medium#audio css2#medium#speech )
         (css2#medium#tactile_medium
           \. (pm#braille_medium
                \. excl
                   { css2#medium#braille___continuous-tactile-feedback_medium
                     css2#medium#embossed___paged-braille-printer_medium
                   } )
         )
    )
    (css2#medium#continuous-or-paged_medium
      \. (css2#medium#continuous_medium
           \. partition
              { (css2#medium#continuous-and-paged_medium 
                  \.  css2#medium#handheld  css2#medium#tv )
                (css2#medium#continuous-and-not-paged_medium
                  \.  css2#medium#braille  css2#medium#screen
                      css2#medium#speech  css2#medium#tty )
              } )
         (css2#medium#paged_medium
           \. partition
              { css2#medium#continuous-and-paged_medium
                (css2#medium#paged-and-not-continuous_medium
                  \.  css2#medium#embossed  css2#medium#print  css2#medium#projection )
              } )
    )
    (css2#medium#grid-or-bitmap_medium
      \. (css2#medium#grid_medium
           \. partition
              { (css2#medium#grid-and-bitmap_medium \.  css2#medium#embossed )
                (css2#medium#grid-and-not-bitmap_medium
                  \.  css2#medium#braille  css2#medium#embossed  css2#medium#tty )
              } )
         (css2#medium#bitmap_medium
           \. partition
              { css2#medium#grid-and-bitmap_medium
                (css2#medium#bitmap-and-not-grid_medium
                  \.  css2#medium#print   css2#medium#projection
                      css2#medium#screen  css2#medium#tv )
              } )
    )
    (css2#medium#interactive-or-static_medium
      \. (css2#medium#interactive_medium
           \. partition
              { (css2#medium#interactive-and-static_medium 
                  \.  css2#medium#braille  css2#medium#handheld  css2#medium#screen
                      css2#medium#speech  css2#medium#tty  css2#medium#tv
                )
                (css2#medium#interactive-and-not-static_medium\.  css2#medium#projection)
              })
         (css2#medium#static_medium
           \. partition
              { css2#medium#interactive-and-static_medium
                (css2#medium#static-and-not-interactive_medium
                  \. css2#medium#embossed  css2#medium#print)
              } )
    );



1. Visual presentation characteristic/attribute/measure

//already represented above:
pm#visual-presentation_characteristic-or-attribute-or-measure
 _(pm#thing -> pm#visual_presentation_characteristic-or-attribute-or-measure)
 \. pm#document-element_related_visual-presentation_characteristic-or-attribute-or-measure
    pm#window_related_visual-presentation_characteristic-or-attribute-or-measure; //frame, pop-up

1.1. Document presentation related characteristic/attribute/measure

pm#document-element_related_visual-presentation_characteristic-or-attribute-or-measure
      \. (pm#visual-effect_characteristic-or-attribute-or-measure
           \. (css2#overflow \. excl{ css2#visible  css2#hidden  css2#scroll  css2#auto  css2#inherit} )
              (css2#clip  pm#value: 1 (css2#shape | css2#auto | css2#inherit) )  
              (css2#visibility
                \. excl{ css2#visible
                         css2#hidden _(^ still affects layout; descendent may have 'visibility: visible' ^)
                         css2#collapse  css2#inherit } )
         )
         (css2#display 
           \. excl{ css2#inline css2#block  css2#inline-block  css2#list-item  css2#run-in
                    css2#table  css2#inline-table  css2#table-row-group  css2#table-header-group 
                    css2#table-footer-group  css2#table-row  css2#table-column-group
                    css2#table-column  css2#table-cell  css2#table-caption
                    css2#none  css2#inherit } )
         (pm#positioning_characteristic-or-attribute-or-measure
           \. excl
              { (css2#position
                  \. excl{ css2#static  css2#relative  css2#absolute  css2#fixed  css2#inherit  } )
                (float
                  \. excl{ css2#left  css2#right  css2#none  css2#inherit } )
                (clear
                  \. excl{ css2#none  css2#left  css2#right  css2#inherit } )
                (css2#box_offset  //if non-static_position
                  \. excl{ css2#top  css2#right  css2#bottom  css2#left },
                  pm#value: 1 (css2#auto | css2#inherit | css2#length | css2#percentage) )
              }
              (css2#z-index  pm#value: 1 (css2#auto | css2#integer | css2#inherit ) )
         )
         (pm#text_direction_characteristic-or-attribute-or-measure
           \. (css2#direction \. excl{ css2#ltr  css2#rtl css2#inherit } )
              (css2#unicode-bidi
                \. excl{ css2#normal  css2#embed  css2#bidi-override  css2#inherit } )
         )
         pm#margin/border-related_characteristic-or-attribute-or-measure
         pm#generated-content_or_automatic-numbering_or_list_characteristic-or-attribute-or-measure  //to refine
         paged-media_characteristic-or-attribute-or-measure  //to refine
         (pm#color-related_characteristic-or-attribute-or-measure
           \. foreground-color  background-color )
         pm#background-related_characteristic-or-attribute-or-measure  //to refine
         (pm#font-related_characteristic-or-attribute-or-measure  //to refine
           \. (font-size < length) (font-style\. italics  bold normal)
              (font-family\. Times_new_Roman  Courrier) )
         pm#text-related_characteristic-or-attribute-or-measure  //to refine
         pm#table-related_characteristic-or-attribute-or-measure  //to refine
         pm#user-interface-related_characteristic-or-attribute-or-measure  //to refine
    );

1.1.1. Margin/border related characteristic/attribute/measure

pm#margin/border-related_characteristic-or-attribute-or-measure
 \. (pm#margin
      \. (css2#margin
             pm#value: 1 (css2#length | css2#percentage | css2#auto),
             pm#part: 1 css2#margin-top   1 css2#margin-right 
                      1 css2#margin-bottom  1 css2#margin-left)
         css2#margin-top  css2#margin-right  css2#margin-bottom  css2#margin-left
    )
    (pm#padding
      \. (css2#padding
             pm#pm#value: 1 (css2#length | css2#percentage),
             pm#part: 1 css2#padding-top   1 css2#padding-right 
                      1 css2#padding-bottom  1 css2#padding-left )
         css2#padding-top  css2#padding-right  css2#padding-bottom  css2#padding-left
    )
    (pm#border_characteristics
      \. (pm#border
           \. (css2#border  pm#part:
                  1 (css2#border-top
                       pm#part: 0..1 css2#border-top-width  0..1 css2#border-top-color 
                                0..1 css2#border-top-style),
                  1 (css2#border-right
                       pm#part: 0..1 css2#border-right-width  0..1 css2#border-right-color 
                                0..1 css2#border-right-style),
                  1 (css2#border-bottom 
                       pm#part: 0..1 css2#border-bottom-width  0..1 css2#border-bottom-color 
                                0..1 css2#border-bottom-style)
                  1 (css2#border-left
                       pm#part: 0..1 css2#border-left-width  0..1 css2#border-left-color 
                                0..1 css2#border-left-style)
               )
               css2#border-top  css2#border-right  css2#border-bottom  css2#border-left
         )
         (pm#border_width
           \. (css2#border-width
                 pm#value: 1 (css2#thin | css2#medium | css2#thick | css2#length),
                 pm#part: 1 css2#border-top-width     1 css2#border-right-width
                          1 css2#border-bottom-width  1 css2#border-left-width)
               css2#border-top-width     css2#border-right-width 
               css2#border-bottom-width  css2#border-left-width
              ) )
         (pm#border_color
           \. (css2#border-color
                 pm#value: color|transparent,
                 pm#part: 1 css2#border-top-color     1 css2#border-right-color
                          1 css2#border-bottom-color  1 css2#border-left-color)
               css2#border-top-color     css2#border-right-color 
               css2#border-bottom-color  css2#border-left-color
              ) )
         (pm#border_style
           \. (css2#border-style
                 pm#value: 1 (css2#none | css2#hidden | css2#dotted | css2#dashed | css2#solid |
                           css2#double | css2#groove | css2#ridge | css2#inset | css2#outset),
                 pm#part: 1 css2#border-top-style     1 css2#border-right-style
                          1 css2#border-bottom-style  1 css2#border-left-style)
               css2#border-top-style     css2#border-right-style 
               css2#border-bottom-style  css2#border-left-style
              ) )
    );


1.1.2. Color related characteristic/attribute/measure

pm#color-related_characteristic-or-attribute-or-measure
 \. css2#color _(^ foreground color ^)
    (css2#background-color  pm#value: css2#transparent),
  pm#value: css2#maroon  css2#red  css2#orange  css2#yellow  css2#olive
            css2#purple  css2#fuchsia  css2#white  css2#lime  css2#green
            css2#navy  css2#blue  css2#aqua  css2#teal
            css2#black css2#silver css2#gray
            css2#inherit;



1.2. Window related characteristic/attribute/measure

pm#window_related_visual-presentation_characteristic-or-attribute-or-measure
 \. (pm#window_frame-or-popup_characteristic-or-attribute-or-measure
      \. excl{ pm#frame  pm#pop-up }
    )
    (pm#window-position_characteristic-or-attribute-or-measure 
      \. ... //to refine:  top  right  bottom  left  center ...
    )
    ...; //to refine
    



2. Aural presentation characteristic/attribute/measure

pm#aural-presentation_characteristic-or-attribute-or-measure
  _(pm#thing -> pm#aural_presentation_characteristic-or-attribute-or-measure);