ヘッダーをスキップ
Oracle® WebCenter Content Dynamic Converter管理者ガイド
11gリリース1 (11.1.1)
B66698-01
  ドキュメント・ライブラリへ移動
ライブラリ
目次へ移動
目次
索引へ移動
索引

前
 
次
 

E Elementsスクリプト・テンプレート

この項の内容は、次のとおりです。

E.1 Elementsスクリプト・テンプレートの概要

Elementsスクリプト・テンプレートは、ソース・ファイルのすべての要素を個別に定義します。

テンプレートは他のテンプレートによって呼び出されることはなく、単にすべてのソース・ファイル要素を分ける役割を果します。

E.2 Elementsスクリプト・テンプレート・コード

この項の各コード・セグメント(太字)には、説明のテキストが付いています。

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset={## INSERT ELEMENT=pragma.charset}">
{## IF ELEMENT=Property.Title}
   <TITLE>{## INSERT ELEMENT=Property.Title}</TITLE>
{## ELSE}
<TITLE>Converted {## INSERT ELEMENT=Pragma.SourceFileName}</TITLE>
{## /IF}

このドキュメントにタイトル・プロパティがある場合は、HTMLタイトルに挿入します。ない場合は、HTMLタイトルにドキュメントの名前を挿入します。

</head>

<body bgcolor="#FFFFFF">
<div align="left">

<table border="0" cellpadding="2" width="600" bgcolor="#8080FF">
   <tr>
      <td><font size="7">Dynamic Converter</font><br>
        <font color="#FFFFFF" size="5">Sample Template – All Elements</font>
      </td>
   </tr>
</table>
</div>

出力ページの一番上にある表、表内のテキスト(Dynamic Converter Sample Template – All Elements)、およびこのテキストのフォントの色とサイズを定義します。

<p>&nbsp;</p>
<div align="left">

<table border="0" cellpadding="2" width="600" bgcolor="#8080FF">
      <tr>
        <td><font color="#FFFFFF" size="5">Standard Properties</font></td>
      </tr>
</table>
</div>

出力ページの2番目の表を定義します。

<p><strong>Author: </strong>
{## INSERT ELEMENT=Property.Author}<br>
<strong>Title: </strong>
{## INSERT ELEMENT=Property.Title}<br>
<strong>Subject: </strong>
{## INSERT ELEMENT=Property.Subject}<br>
<strong>Keywords: </strong>
{## INSERT ELEMENT=Property.Keywords}<br>
<strong>Comment:</strong>
{## INSERT ELEMENT=Property.Comment}</p>

これらの## Insertマクロは、ソース・ファイルのそれぞれのプロパティ(Author、Title、Subject、Keywords、Comments)を、エクスポートされるソース・ファイルの作成者が記載したとおりに挿入します。

<div align="left">

<table border="0" cellpadding="2" width="600" bgcolor="#8080FF">
   <tr>
      <td><font color="#FFFFFF" size="5">Other Properties</font></td>
   </tr>
</table>
</div>

出力ページの3番目の表を定義します。

<p>{## REPEAT ELEMENT=Property.Others}
<strong>
{## INSERT
ELEMENT=Property.Others.Current.Name}: </strong>
{## INSERT ELEMENT=Property.Others.Current.Body}<br>
{## /REPEAT}</p>

エクスポートされるソース・ファイルの他のプロパティの名前と本体を、ソース・ファイルの作成者が定義したとおりに挿入します。NameプロパティとBodyプロパティは、初期プロパティ(Author、Title、Subject、Keywords、Comments)とは別に参照されます。ソース・ファイルの作成者は、初期プロパティのキーワードを持たない別のプロパティを作成することができ、これらの別個のプロパティは前述の## REPEATマクロを使用して読み取ることができます。これは、ソース・ファイルの他の指定されていないプロパティを、それらの名前要素と本体要素の両方を参照して出力することで、ループすることによって実行されます。

<p>{## REPEAT ELEMENT=Sections}</p>

反復可能要素Sectionsに対するループを使用して、ソース・ファイルの最高レベルの抽象を表します。この反復可能要素により、3シートのスプレッドシートに対してループを実行し、たとえば、各シートを出力で表示できます。1つのセクションの別々の部分をそれぞれ出力するには、すべてのセクションを通してループする必要があります。一般には次のようになります。

<div align="left">
<table border="0" cellpadding="2" width="600" bgcolor="#8080FF">
<tr>
    <td><font color="#FFFFFF" size="5">Section
{## INSERT NUMBER=Sections.Current.Value}
The fourth table of the output page is defined and the index value that is inserted into the table is incremented once through each loop.

{## IF ELEMENT=Sections.Current.Type VALUE=WP}
- Document
{## ELSE}
{## IF ELEMENT=Sections.Current.Title} - {## INSERT ELEMENT=Sections.Current.Title
      SUPPRESSTAGS}
{## /IF}

{## /IF}

</font>
</td>

テンプレートは、ソース・ファイルがワード・プロセッシング(WP)かどうかを判断し、次の処理を行います。

</tr>
</table>
</div>

<p>
{## INSERT ELEMENT=Sections.Current.BodyOrImage}</p>

このマクロ行を使用すると、テンプレート作成者は任意のドキュメント・タイプを説明できます。「要素」項のSections.x.BodyOrImageを参照してください。

<p>
{## IF ELEMENT=Sections.Current.Type VALUE=WP}
</p>
<p>
{## IF ELEMENT=Sections.Current.Footnotes.1.Body}
</p>
<div align="left">
<table border="0" cellpadding="2"width="600" bgcolor="#8080FF">
<tr>
  <td><font color="#FFFFFF" size="5">Footnotes</font>
</td>
</tr>
</table>

テンプレートでは、まずセクション・タイプがワード・プロセッシングであるかどうかを判断し、次にこのセクションに脚注が含まれているかどうかを判断します。脚注が含まれている場合は、Footnotesを導入する表が定義されます。

</div>
<p>
{## REPEAT ELEMENT=Sections.Current.Footnotes}
{## INSERT ELEMENT=Sections.Current.Footnotes.Current.Body}
<br>
{## /REPEAT}
{## ELSE}
</p>
<div align="left">
<table border="0" cellpadding="2" width="600" bgcolor="#8080FF">
<tr>
<td><font color="#FFFFFF" size="5">No Footnotes</font></td>
</tr>
</table>
</div>
<p>
{## /IF}

</p>

反復可能要素によって、現行セクションと関連付けられたすべての脚注が出力されます。現行セクションに関連付けられた脚注がない場合は、No Footnotesを示す表が作成されます。

このテンプレートのHTMLコーディングの残りは、前述のFootnotes反復可能要素にコーディングが似ている要素に関するものです。たとえば、次の反復可能要素Endnotesの場合、コーディングは、脚注の場合と同様に、ソース・ファイル出力にエンドノートを表示する機能を果します。

反復可能要素によって、そのセクションと関連付けられたすべてのエンドノートが出力されます。

次のHTMLコーディングとその結果の出力では、注釈、コメント、ヘッダー、フッターおよびブックマークについて同じ手順となります。

<p>
{## IF ELEMENT=Sections.Current.Endnotes.1.Body}
</p>
<div align="left">
<table border="0" cellpadding="2" width="600" bgcolor="#8080FF">
<tr>
<td><font color="#FFFFFF" size="5">Endnotes</font></td>
</tr>
</table>
</div>
<p>
{## REPEAT ELEMENT=Sections.Current.Endnotes}
{## INSERT ELEMENT=Sections.Current.Endnotes.Current.Body}<br>
{## /REPEAT}

{## ELSE}
</p>
<div align="left"><table border="0" cellpadding="2" width="600" bgcolor="#8080FF">
<tr>
<td><font color="#FFFFFF"
size="5">No Endnotes</font></td>
</tr>
</table>
</div>
<p>
{## /IF}

</p>
<p>
{## IF ELEMENT=Sections.Current.Annotations.1.Body}
</p>
<div align="left">
<table border="0" cellpadding="2" width="600" bgcolor="#8080FF">
<tr>
    <td><fontcolor="#FFFFFF" size="5">Annotations</font></td>
</tr>
</table>
</div>
<p>
{## REPEAT ELEMENT=Sections.Current.Annotations}
   {## INSERT ELEMENT=Sections.Current.Annotations.Current.
Body}<br>
{## /REPEAT}

{## ELSE}
</p>
   <div align="left">
<table border="0" cellpadding="2" width="600" bgcolor="#8080FF">
<tr>
<td><font color="#FFFFFF" size="5">No Annotations</font></td>
</tr>
</table>
</div>
<p>
{## /IF}

</p>
<p>

{## IFELEMENT=Sections.Current.Headers.1.Body}
</p>
<div align="left">
<table border="0" cellpadding="2" width="600" bgcolor="#8080FF">
<tr>
<td><font color="#FFFFFF" size="5">Headers</font></td>
</tr>
</table>
</div>
<p>
{## REPEAT ELEMENT=Sections.Current.Headers}
{## INSERT ELEMENT=Sections.Current.Headers.Current.Body} <br>
    {## /REP}

{## ELSE}
</p>
<div align="left"><table border="0" cellpadding="2" width="600" bgcolor="#8080FF">
<tr>
<td><font color="#FFFFFF" size="5">No Headers</font></td>
</tr>
</table>
</div>
<p>
{## /IF}

</p>
<p>
{## IF ELEMENT=Sections.Current.Footers.1.Body}
</p>
<div align="left">
<table border="0" cellpadding="2" width="600" bgcolor="#8080FF">
<tr>
<td><font color="#FFFFFF" size="5">Footers</font></td>
</tr>
</table>
</div>
<p>
{## REPEAT ELEMENT=Sections.Current.Footers}
{## INSERT ELEMENT=Sections.Current.Footers.
Current. Body}<br>
{## /REP}

{## ELSE}
</p>
<div align="left">
<table border="0" cellpadding="2" width="600" bgcolor="#8080FF">
<tr>
<td><font color="#FFFFFF" size="5">No Footers</font></td>
</tr>
</table>
</div>
<p>
{## /IF}

</p>
<p>
{## /IF}

</p>
<p>
{## /REPEAT}

</p>
</body>
</html>