Content Item XML Formats

This appendix covers the following topics:

XML Format Overview

You must understand the XML formats of OCM content items to create a correct XSL stylesheet.

Regular Expressions

The following regular expressions give the formal description of the XML format of OCM content items.

Content Item XML ::=
{ Content Item Open Tag },
{ Attachment Attribute }?,
{ Primitive Attribute }*,
{ Component Item Attribute Reference }*,
{ Component Item Attribute }*,
{ Content Item End Tag }
Content Item Open Tag ::= 
<CONTENT_TYPE_CODE datatype="citem" id="content_item_id" version="version_number"
available="available_date" expiration="expiration_date" 
ircode="item_reference_code" ref="f"  url="ibcGetContentItem.jsp?cItemId=content_item_id">
Content Item End Tag ::= 
</CONTENT_TYPE_CODE>
Attachment Attribute ::=
<ATTACHMENT_ATTRIBUTE_TYPE_CODE datatype="attachment" id="attachment_file_id" 
ref="t" file="attachment_file_name" mimeType="attachment_mime_type" 
renditionName="rendition_name" defaultMimeType="t" url="ibcGetAttachment.jsp?fileId=attachment_file_id" />
Primitive Attribute ::= 
{ Primitive String Attribute } | { Primitive Number Attribute } | { Primitive Date Attribute } |
{ Primitive Boolean Attribute } | { Primitive HTML Attribute } | { Primitive URL Attribute }
Primitive String Attribute ::= 
<TEXT_ATTRIBUTE_TYPE_CODE datatype="string">
string value
</TEXT_ATTRIBUTE_TYPE_CODE>
Primitive Number Attribute ::=
<NUMBER_ATTRIBUTE_TYPE_CODE datatype="decimal">
number value
</NUMBER_ATTRIBUTE_TYPE_CODE>
Primitive Date Attribute ::=
<DATE_ATTRIBUTE_TYPE_CODE datatype="dateTime">
date value
</DATE_ATTRIBUTE_TYPE_CODE>
Primitive Boolean Attribute ::=
<BOOLEAN_ATTRIBUTE_TYPE_CODE datatype="boolean">
boolean value
</BOOLEAN_ATTRIBUTE_TYPE_CODE>
Primitive HTML Attribute ::=
<HTML_ATTRIBUTE_TYPE_CODE datatype="html">
html value
</HTML_ATTRIBUTE_TYPE_CODE>
Primitive URL Attribute ::=
<URL_ATTRIBUTE_TYPE_CODE datatype="url">
url value
</URL_ATTRIBUTE_TYPE_CODE>
Component Item Attribute Reference ::=
<COMPONENT_ATTRIBUTE_TYPE_CODE datatype="component" id="component_item_id"
ref="t" url="ibcGetContentItem.jsp?cItemId=component_item_id" />
Component Item Attribute ::=
{ Component Item Attribute Open Tag},
{ Content Item XML },
{ Component Item Attribute End Tag }
Component Item Attribute Open Tag ::=
<COMPONENT_ATTRIBUTE_TYPE_CODE datatype="component" id="component_item_id"
ref="f" url="ibcGetContentItem.jsp?cItemId=component_item_id" >
Component Item Attribute End Tag ::=
</COMPONENT_ATTRIBUTE_TYPE_CODE>

An XML Example for Content Item

<WHITEPAPER datatype="citem" id="10017" version="2" available="2002-05-01"
expiration="2003-05-01" ircode="WP123" ref="f"
url="ibcGetContentItem.jsp?cItemId=10017">
  <!-- Attachment Attribute -->
  <WP_ATTACHMENT datatype="attachment" id="24357" ref="t" file="wp123.pdf"
mimeType="application/pdf" renditionName="PDF" defaultMimeType="t" url="ibcGetAttachment.jsp?fileId=24357" />
  <!-- Primitive Attributes -->
  <NAME datatype="string">Oracle 9i</NAME>
  <DESCRIPTION datatype="string">Oracle 9i Description</DESCRIPTION>
  <PUBLISH_DATE datatype="dateTime">27-DEC-01 17:24:18 PST</PUBLISH_DATE>
  <RELEASED datatype="boolean">T</RELEASED>
  <PRODUCT_ID datatype="decimal">1234567</PRODUCT_ID>
  <!-- Component Item Attribute Expanded -->
  <WP_IMAGE datatype="component" id="10003" ref="f" url="ibcGetContentItem.jsp?cItemId=10003">
   <IMAGE datatype="citem" id="10003" version="9" available="" expiration="" 
ircode="WPIMAGE123" ref="f" url="ibcGetContentItem.jsp?cItemId=10003">
     <IMAGE_FILE datatype="attachment' id="24358" ref="t" file="image123.gif" 
mimeType="image/gif" renditionName="GIF" defaultMimeType="t" url="ibcGetAttachment.jsp?cItemId=24358" />
     <NAME datatype="string">Image</NAME>
     <DESCRIPTION datatype="string">Image Description</DESCRIPTION>
     <AUTHOR datatype="string">Test Author</AUTHOR>
   </IMAGE>
  </WP_IMAGE>
</WHITEPAPER>