PSML

A complete reference of PageSeeder's markup language PSML

<uri>

Summary

A metadata element providing information about the underlying URI corresponding to the PSML document.

Note

The only attributes used by the upload are:

  • @docid (NOT for external URIs)
  • @documenttype
  • @title
  • @folder (only for external URIs)

The only elements used by the upload are:

  • <description>
  • <labels>

Usage context

Element categorymetadata
PSML levelmetadata
Permitted content<displaytitle> <description> <labels>
Permitted parent<documentinfo>
HTML equivalentno equivalent
OpenXML equivalent
PSStandard equivalent<ps:uri>

Attributes

This element includes the following attributes

NameTypeRequiredDescription
createdxs:dateTimenoDate time the document URI was created in ISO 8601 format (e.g. 2012-05-23T15:33:52+10:00)
decodedpathxs:stringnoDocument URI path not URL encoded (e.g. /ps/acme/specs/my product.xml)
dociddocument-idnoUser entered unique document identifier.
documenttypedocument-typenoDocument type (aka document config)
externalbooleannoIf "true" this is a URL (external URI)
folderbooleannoIf "true" this is a folder (for external URI only)
hostxs:stringnoDocument URI host (e.g. mycompany.com)
idxs:longnoUnique and permanent URI identifier.
mediatypexs:stringnoDocument media type (e.g. text/html)
modifiedxs:dateTimenoDate time the document URI was last modified in ISO 8601 format (e.g. 2012-05-23T15:33:52+10:00)
pathxs:stringnoDocument URI path (e.g. /ps/acme/specs/product.xml)
portxs:integernoDocument URI port number (e.g. 80, 443)
schemexs:stringnoDocument URI scheme (e.g. http, https)
titledocument-titlenoThe title of the URI
sizexs:longThe file size in bytes (non-PSML only)

@created

Date and time the document URI was created in ISO 8601 date time format including the timezone. Uploading documents does not affect this field. INFORMATIONAL - ignored by upload.

For example "2012-05-23T15:33:52+10:00"

@decodedpath

The path of the document URI in its URL-decoded form. INFORMATIONAL - ignored by upload.

For example: /ps/acme/specs/myproduct.psml

@docid

The Doc ID of the document (not used for external URIs) .

It can only contain alphanumeric characters, hyphens and underscores.

Note

The Doc ID is a system-wide ID that is guaranteed to be unique within a URI host, but can be used as a public identifier for the document.

@documenttype

The document type if the document if any. Used by upload if no document/@type.

It can only contain alphanumeric characters and underscores.

@external

A boolean flag indicating whether the URI refers to a PageSeeder URL instead of a regular document. INFORMATIONAL - ignored by upload.

@folder

A boolean flag indicating whether the URI refers to a folder instead of a regular document - only used for URLs (external URIs).

@host

The document URI host. INFORMATIONAL - ignored by upload.

@id

The URI ID of the document. INFORMATIONAL - ignored by upload.

The URI is a system-wide unique ID for the document that is specific to the PageSeeder instance.

@mediatype

The media type of the document. INFORMATIONAL - ignored by upload.

All PSML documents have the media type: "application/vnd.pageseeder.psml+xml"

@modified

The last time the document was modified in ISO 8601 date time format. Any edit, note or version will update this field. INFORMATIONAL - ignored by upload.

@path

The URL-encoded path of the document URI. INFORMATIONAL - ignored by upload.

@port

The port for the document URI. INFORMATIONAL - ignored by upload.

@scheme

The scheme for the document URI. INFORMATIONAL - ignored by upload.

@title

The title of the document URI.

This attribute is optional and it is only specified if a title was given. In general, to know the title of document URI to display, use the <displaytitle> element instead  because it falls back on the filename when the document is not given a specific title.

@size

The file size in bytes (non-PSML documents only). INFORMATIONAL - ignored by upload.

Examples

Schema

XML Schema

<xs:element name="uri">
   <xs:complexType>
      <xs:all>
         <xs:element name="displaytitle" type="xs:string" minOccurs="0"/>
         <xs:element name="description" type="xs:string" minOccurs="0"/>
         <xs:element ref="labels" minOccurs="0"/>
      </xs:all>
      <xs:attribute name="id" type="xs:long"/>
      <xs:attribute name="docid" type="document-id" use="optional">
         <xs:simpleType>
            <xs:restriction base="xs:string">
               <xs:maxLength value="100"/>
            </xs:restriction>
         </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="scheme" type="xs:string"/>
      <xs:attribute name="host" type="xs:string"/>
      <xs:attribute name="port" type="xs:integer"/>
      <xs:attribute name="path" type="xs:string"/>
      <xs:attribute name="decodedpath" type="xs:string"/>
      <xs:attribute name="title" type="xs:string">
         <xs:simpleType>
            <xs:restriction base="xs:string">
               <xs:maxLength value="250"/>
            </xs:restriction>
         </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="created" type="xs:string" use="optional"/>
      <xs:attribute name="modified" type="xs:string" use="optional"/>
      <xs:attribute name="documenttype" type="document-type" use="optional"/>
      <xs:attribute name="mediatype" type="xs:string" use="optional"/>
      <xs:attribute name="external" type="xs:boolean" use="optional"/>
      <xs:attribute name="folder" type="xs:boolean" use="optional"/>
      <xs:attribute name="size" type="xs:long" use="optional"/> 
   </xs:complexType>
</xs:element>

Relax Schema

element uri {
   attribute id { xs:long } ,
   attribute docid { document-id { maxLength = "100" } }?,
   attribute scheme { text },
   attribute host { text },
   attribute port { xs:integer },
   attribute path { text },
   attribute decodedpath { text },
   attribute title { text { maxLength = "250"} },
   attribute created { xs:dateTime }?,
   attribute modified { xs:dateTime }?,
   attribute documenttype { document-type }?,
   attribute mediatype { text }?,
   attribute external { xs:boolean },
   attribute folder { xs:boolean },
   attribute size { xs:long },
   element displaytitle?,
   element description?,
   element labels?
}

Compatibility

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

PS Standard XML

This element replaces the <ps:uri> element from PS Standard XML.

The @behavior attribute has been removed and replaced by more explicit attributes. The @datecreated attribute has been renamed @created in PSML.

The following PS Standard XML:

<ps:uri behavior="[type]-[config]-[style]" datecreated="[datetime]">

... is now this in PSML:

<uri mediatype="[media type]"
  documenttype="[document type]"
      modified="[datetime]"
       created="[datetime]">

See also

Created on , last edited on