컨텐츠 집계업체를 사용하면 외부 데이터로 컨텐츠를 더욱 돋보이게 할 수 있습니다. 이 데이터는 범용 쿼리 또는 연결된 표에서 옵니다.
쿼리는 Aggregator 탭의 게시 템플릿을 통해 구성됩니다.
가져온 데이터는 기본 요소를 통해 XML 출력 문서를 보완합니다.
받는 사람 스키마의 쿼리에서 반환되는 예(nms:recipient):
<book name="Content Management">
...
<collection-recipient>
<recipient lastName="Doe" firstName="John" email="john.doe@aolf.com">
...
</collection-recipient>
</book>
<collection-recipient>
요소는 쿼리에서 발생한 문서의 입력 요소를 나타냅니다. 검색된 데이터가 이 요소 아래에 반환됩니다.수신자 목록에 있습니다.
쿼리 매개 변수는 마법사를 사용하여 편집합니다.
첫 번째 페이지에서 검색할 데이터를 포함하는 레이블과 스키마를 지정합니다.
편집 필드 경로는 쿼리 출력 요소의 이름을 바꾸는 데 사용됩니다.
다음 페이지에서 검색할 데이터를 선택할 수 있습니다.
다음 페이지는 필터 조건을 정의합니다.
마지막 페이지는 쿼리에서 반환된 데이터의 미리 보기를 실행합니다.
링크를 사용하면 컨텐츠에 연결된 외부 데이터를 검색할 수 있습니다.
연결된 데이터에는 두 가지 유형이 있습니다.
다음과 같이 데이터 스키마에 컨텐트 링크가 선언됩니다.
<element expandSchemaTarget="cus:chapter" label="Main chapter" name="mainChapter" type="string"/>
링크의 정의는 문자열-type <element>
에 채워지고, expandSchemaTarget 특성은 대상 스키마("cus:chapter" in adobe 예)를 참조합니다. 참조된 스키마는 콘텐츠 스키마여야 합니다.
타깃팅된 요소의 내용은 링크 요소(예: 예제 스키마의 <chapter>
요소)를 향상시킵니다.
<mainChapter computeString="Introduction" id="7011" title="Introduction" xtkschema="cus:chapter">
<page>Introduction to input <STRONG>forms</STRONG>.</page>
</mainChapter>
링크의 연산 문자열은 computeString 특성에서 제공됩니다.
입력 양식에서 링크의 편집 컨트롤은 다음과 같이 선언됩니다.
<input type="articleEdit" xpath="mainChapter"/>
Magnifier 아이콘을 사용하여 연결된 요소의 편집 양식을 열 수 있습니다.
링크 컬렉션을 채우려면 데이터 스키마의 링크 요소 정의에 언바운드="true" 속성을 추가합니다.
<element expandSchemaTarget="cus:chapter" label="List of chapters" name="chapter" ordered="true" unbound="true"/>
타깃팅된 요소의 내용은 각 컬렉션 요소를 풍부하게 합니다.
<chapter computeString="Introduction" id="7011" title="Introduction" xtkschema="cus:chapter">
<page>Introduction to input <STRONG>forms</STRONG>.</page>
</chapter>
입력 양식에서 목록 컨트롤은 다음과 같이 선언됩니다.
<input editable="false" nolabel="true" toolbarCaption="List of chapters" type="articleList" xpath="chapter" zoom="true"/>
대상 요소의 계산 문자열을 보기 위해 기본 열이 표시됩니다.
외부 테이블에 대한 링크는 다음과 같이 데이터 스키마에 선언됩니다.
<element label="Main contact" name="mainContact" target="nms:recipient" type="link"/>
링크의 정의는 링크-type <element>
에 채워지고, target 특성은 대상 스키마("nms:recipient"(예:
규칙에 따라, 링크는 데이터 스키마의 주 요소에서 선언되어야 합니다.
계산 문자열 및 타깃팅된 요소의 키는 기본 요소의 <name>-id
및 <name>-cs
특성을 정의합니다.
이 예제에서 링크는 "cus:book" 스키마에 채워지고, 링크 데이터의 내용은 "mainContact-id" 및 "mainContact-cs" 속성에 포함됩니다.
<book computeString="Content management" date="2006/06/08" id="6106" language="en" mainContact-cs="John Doe (john.doe@adobe.com)" mainContact-id="3012" name="Content management" xtkschema="cus:book">
링크 편집 컨트롤은 다음과 같이 선언됩니다.
<input xpath="mainContact"/>
입력 양식의 링크 정의를 통해 <sysfilter>
요소를 추가하여 대상 요소 선택을 제한할 수 있습니다.
<input xpath="mainContact">
<!-- Filter the selection of the link on the Adobe domain -->
<sysFilter>
<condition expr="@domain = 'adobe.com '"/>
</sysFilter>
</input>
이 제한은 컨텐츠 링크에도 적용됩니다.
컬렉션의 정의는 컬렉션 요소 목록의 정의와 동일합니다.
<element label="List of contacts" name="contact" unbound="true">
<element label="Recipient" name="recipient" target="nms:recipient" type="link"/>
</element>
입력 양식에서 목록 컨트롤은 다음과 같이 선언됩니다.
<input nolabel="true" toolbarCaption="List of contacts" type="list" xpath="contact">
<input xpath="recipient"/>
</input>
목록을 편집할 수 있으며 위에 표시된 "링크" 유형 컨트롤에서 링크를 선택할 수 있습니다.
타깃팅된 요소의 내용은 출력 문서의 각 컬렉션 요소를 향상시킵니다.
<contact id="11504978621" recipient-cs="Doe John (john.doe@adobe.com)" recipient-id="3012"/>
<contact id="11504982510" recipient-cs="Martinez Peter (peter.martinez@adobe.com)" recipient-id="3013"/>
참조된 각 링크의 내용은 내부 키와 타깃팅된 요소의 계산 문자열으로 제한됩니다.
JavaScript 스크립트는 SOAP 쿼리를 통해 링크의 컨텐츠를 보완하는 데 사용됩니다.
예:받는 사람 이름을 "mainContact" 링크 및 "contact" 컬렉션 링크에 추가:
// Update <mainContact> link
var mainContactId = content.@['mainContact-id']
var query = xtk.queryDef.create(
<queryDef schema="nms:recipient" operation="get">
<select>
<node expr="@lastName"/>
</select>
<where>
<condition expr={"@id="+mainContactId}/>
</where>
</queryDef>)
var recipient = query.ExecuteQuery()
content.mainContact.@lastName = recipient.@lastName
// Update <contact> link collection
for each(var contact in content.contact)
{
var contactId = contact.@['recipient-id']
var query = xtk.queryDef.create(
<queryDef schema="nms:recipient" operation="get">
<select>
<node expr="@lastName"/>
</select>
<where>
<condition expr={"@id="+contactId}/>
</where>
</queryDef>
)
var recipient = query.ExecuteQuery()
contact.@lastName = recipient.@lastName
}
스크립트 실행 후 얻은 결과:
<mainContact lastName="Doe"/>
<contact id="11504978621" lastName="Doe" recipient-cs="Doe John (john.doe@adobe.com)" recipient-id="3012"/>
<contact id="11504982510" lastName="Martinez" recipient-cs="Martinez Peter (peter.martinez@adobe.com)" recipient-id="3013"/>
JavaScript 코드의 내용은 Administration > Configuration > Content management > JavaScript Codes 폴더를 통해 추가되고 각 변환에 대한 발행물 템플릿에 채워야 합니다.