In an XHTML document that the Oracle ATG Web Commerce platform generates from a repository item, metadata properties are represented by meta tags in the head of the document, while text properties are represented by div tags in the body of the document. The ATG platform generates meta and div tags using values from the repository item’s properties, and uses a URL of the following form to uniquely identify each document:

atgrep:/repository-name/item-descriptor-name/repository-id

meta and div properties are output with the following formats:

<meta name="atg:type:property-name" content="property-value">

<div class="atg:role:property-name" id="ID">

The XHTML documents name the properties using a simplified bean property notation. For example, a document generated from a user profile might have firstName and lastName properties corresponding to the equivalent properties of the user repository item type. The document properties corresponding to the city and postalCode properties of the homeAddress child repository item would be homeAddress.city and homeAddress.postalCode.

Multi-value properties are given names without array subscripts, as are the property names of multi-value repository item properties. For example, suppose a user repository item can have multiple homeAddress child items. In the ATG platform, the state properties of these items would be named homeAddress[0].state and homeAddress[1].state. In the XHTML documents, however, both properties would be named homeAddress.state.

In addition to the properties you specify in the definition file, the output document also automatically includes a few special metadata properties. These properties provide information that identifies the repository items represented in the document, and they are indicated by a dollar-sign ($) prefix: $repositoryId, $repository.repositoryName, and $itemDescriptor.itemDescriptorName. It is often a good idea to exclude some of these properties to reduce the size of your index. See Suppressing Properties.

The output for the document-level item also includes a $url property and a $baseUrl property, which each contain the URL representing this repository item. The difference between these properties is that if a VariantProducer is used to generate multiple documents from the same repository item, the $url property for each document will include unique query arguments to distinguish the document from the others. The $baseUrl property, which omits the query arguments, will be the same for each document. See Using Variant Producers for more information.

The following example shows sample XHTML output from the definition file that appears in the Definition File Format section:

<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
    <title>Madeira</title>
    <meta name="atg:date:dateOfBirth" content="-1583175600000"/>
    <meta name="atg:string:$repository.repositoryName"
      content="UserProfiles"/>
    <meta name="atg:string:$repositoryId" content="743"/>
    <meta name="atg:string:$itemDescriptor.itemDescriptorName"
      content="user"/>
    <meta name="atg:string:$url" content="atgrep:/UserProfiles/user/743"/>
    <meta name="atg:string:$baseUrl"
      content="atgrep:/UserProfiles/user/743"/>
    <meta name="atg:string:homeAddress.$repository.repositoryName"
      content="UserProfiles"/>
    <meta name="atg:string:homeAddress.$repositoryId" content="743"/>
    <meta
    name="atg:string:homeAddress.$itemDescriptor.itemDescriptorName"
      content="contactInfo"/>
  </head>
  <body>
    <div class="atg:role:firstName" id="0">
      Franklin
    </div>
    <div class="atg:role:lastName" id="1">
      Madeira
    </div>
    <div class="atg:role:homeAddress.address1" id="2">
      802 Replicant Blvd.
    </div>
    <div class="atg:role:homeAddress.city" id="3">
      Los Angeles
    </div>
    <div class="atg:role:homeAddress.state" id="4">
      CA
    </div>
    <div class="atg:role:homeAddress.postalCode" id="5">
      98506
    </div>
    <div class="atg:role:homeAddress.phoneNumber" id="6">
      (212)555-1234
    </div>
  </body>
</html>