PSML

A complete reference of PageSeeder's markup language PSML

<properties-fragment>

Summary

The <properties-fragment> element is a fragment which only contains <property> elements.

Other kind of fragment elements:

Usage context

Element categorystructure
PSML levelportable
Permitted content<property>
Permitted parent<section>
HTML equivalentno equivalent
OpenXML equivalent
PSStandard equivalent<body>
(when <section format="pslabelvalues">)

Attributes

This element includes the following attributes:

NameTypeRequiredDescription
idfragment-idyesThe fragment ID.
typefragment-typenoThe template type.
labelslabel-listnoA list of fragment label values.

@id

The fragment ID, which must be unique within the document.

@type

The type of properties fragment, which may reflect the type of template.

Examples

A simple example:

  <properties-fragment   id="3">
       <property name="part-id"
                 value="FY765A"/>
 <property name="part-category"
             value="Industrial"/>
</properties-fragment>

A complex example:

<properties-fragment  id="4" >

     <property  name="title"
               title="Title" 
 value="Alice's Adventures
              in Wonderland"/>

      <property  name="isbn"
                title="ISBN"
       value="0000000000001"/>

    <property  name="author"
              title="Author"
        value="Lewis Caroll"/>

   <property name="language"
            title="Language">
          <value>English
                   </value>
          <value>Spanish
                   </value>
      </property>

    <property name="country"
             title="Country"
           value="Australia"/>

    <property 
       name="available-date"
             datatype="date"
      title="Available date"
          value="2012-01-01"/>

    <property name="related"
                   count="n"
             datatype="xref"
             title="Related">
        <xref 
           href="book4.psml"
              frag="default"/>
        <xref 
           href="book7.psml"
              frag="default"/>
    </property>
</properties-fragment>

Schema

XML Schema

<xs:element name="properties-fragment">
   <xs:complexType>
      <xs:sequence>
            <xs:element ref="property"
                         minOccurs="0"
                 maxOccurs="unbounded"/>
      </xs:sequence>
              <xs:attribute  name="id"
                    type="fragment-id" 
                        use="required"/>
            <xs:attribute  name="type"
                  type="fragment-type"/>
          <xs:attribute  name="labels"
                     type="label-list"/>
   </xs:complexType>
</xs:element>

Relax schema

element properties-fragment {
   attribute id { fragment-id },
   attribute type { fragment-type }?,
   attribute labels { label-list }?, 
   element property*
}

Compatibility

This element was introduced in the first draft of PSML and is well-supported from PageSeeder 5.1.

PS Standard XML

In the Standard Format, fragments are expressed using the <body> element and a different algorithm is used to compute their fragment identifier. Support for the @pagebreak attribute has been dropped.

Section formats have been deprecated and new specialized fragments have been created. The PSML <properties-fragment> element corresponds to a Standard Format <body> element when the parent section has format "pslabelvalues".

There was no concept of property in the Standard Format so value pairs were expressed as inline labels (wrapped in paragraphs for validation purposes). This has been replaced in PSML by a <property> element.

See also

How to create a properties fragment tutorial.

Created on , last edited on