PSML

A complete reference of PageSeeder's markup language PSML

<placeholder>

Summary

When resolved, the <placeholder> element will have its content replaced with the corresponding metadata property value on the parent publication. If no publication exists, it will use the current document's metadata. It is only supported in the v6 UI and only for single value properties with type text or date.

The initial content of the element is the text displayed when the placeholder has not been resolved.

Usage context

Element categorycharacter-style
PSML levelportable
Permitted contenttext
Permitted parent
HTML equivalent<var>
OpenXML equivalent
PSStandard equivalent

Attributes

This element includes the following attributes:

NameTypeRequiredDescription
namelabelyesThe name of the metadata property containing the resolved content.
unresolvedbooleannoPresent when the placeholder cannot be resolved to a property (fixed value "true" ). Only allowed for level="processed".

@name

The name of the metadata property containing the resolved content.

@unresolved="true"

Present when the placeholder cannot be resolved to a property. Only allowed for level="processed".

Examples

A simple paragraph with an inline label to markup the author.

<para>This book was written by <placeholder name="author">An Author</placeholder>.</para>

When resolved it would appear as:

<para>This book was written by <placeholder name="author">Lewis Carroll</placeholder>.</para>

When unable to be resolved (i.e. no matching metadata property) it would appear as:

<para>This book was written by <placeholder name="author" unresolved="true">An Author</placeholder>.</para>

Schema

XML Schema

<xs:element name="placeholder">
  <xs:complexType>
    <xs:simpleContent>
       <xs:extension   base="xs:string">
            <xs:attribute   name="name" 
                           type="label"
                         use="required" />                 
        <xs:attribute name="unresolved"
                      type="xs:boolean"
                           fixed="true" />                 
       </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
</xs:element>

Relax Schema

element placeholder{
   attribute name { label },
   attribute resolved { boolean }?,
   text
}

Compatibility

This element was introduced in PSML v1.1 and is supported in the v6 UI from PageSeeder 5.9712.

See also

Created on , last edited on