Translation:10 9/ja

From IDMLWiki

Jump to: navigation, search

9節 / XMLエレメント

Contents

10.9 XMLエレメント

この節では、InDesignドキュメントのXML構造にあるXMLエレメントを、IDMLドキュメントとして記述する方法を説明します。

10.9.1 BackingStory.xml

IDMLパッケージのBackingStory.xmlファイルには、InDesignドキュメントに配置されていないXMLコンテンツが含まれています。

スキーマの例129 BackingStory
  1. BackingStory_File = element idPkg:BackingStory { 
  2.   XmlStory_Object*
  3. }

下記は、すべてのXMLコンテンツがドキュメント上に配置されているIDMLパッケージの<idpkg:BackingStory>エレメントの例です。(「10.4 ストーリー」のMappingStyleToTagsの例を参照)XML構造には、ルートエレメント<XMLElement>の子エレメントが1つあり、IDMLパッケージの<Story>エレメントとSelf属性ud8で関連付けられています。

IDMLの例85 BacingStory
  1. <idPkg: BackingStory xmlns:idPkg=" http://ns.adobe.com/AdobeInDesign/ idml/1.0/ packaging">
  2.   <XmlStory Self="u9c">
  3.     <ParagraphStyleRange AppliedParagraphStyle= "ParagraphStyle\ kNormalParagraphStyle">
  4.       <CharacterStyleRange AppliedCharacterStyle= "CharacterStyle\ k[No character style]">
  5.         <Content></Content>
  6.         <XMLElement Self="di2" MarkupTag=" XMLTag\cRoot">
  7.           <XMLElement Self="di2i3" MarkupTag=" XMLTag\cStory" XMLContent="ud8"/>
  8.         </XMLElement>
  9.       </CharacterStyleRange>
  10.     </ParagraphStyleRange>
  11.   </XmlStory>
  12. </idPkg: BackingStory>

10.9.2 XMLStory

<XMLStory>エレメントは、配置されていないXMLテキストコンテンツで、<Story>エレメントと同じく、ストーリーの参照です。<XMLStory>エレメントには<ParagraphStylerange>エレメント、<CharacterStyleRange>エレメント、<Table>エレメント、アンカー付きフレームおよび<Story>エレメントにあるすべてのエレメントが含まれます。

10.9.3 XMLElement

<XMLElement>エレメントは、InDesignドキュメントのXML構造のコンテンツです。テキストの<XMLElement>の例は、「10.4.9 テキストのXMLエレメント」を参照してください。ページオブジェクトを伴う<XMLElement>の例は、「XMLエレメントとページオブジェクトの結合」を参照してください。

スキーマの例130 XMLElement
  1. XMLElement_Object = element XMLElement {
  2.   attribute Self { xsd:string },
  3.   attribute MarkupTag{  xsd:string }?,
  4.   attribute XMLContent { xsd:string }?,
  5.   attribute NoTextMarker{  XMLNoTextMarker_EnumValue }?,
  6. (
  7.   XMLAttribute_Object*&
  8.   DTD_Object*&
  9.   XMLElement_Object*&
  10.   XMLComment_Object*&
  11.   XMLInstruction_Object*&
  12.   TextFrame_Object*&
  13.   Oval_Object*&
  14.   Rectangle_Object*&
  15.   GraphicLine_Object*&
  16.   Polygon_Object*&
  17.   Group_Object*&
  18.   EPSText_Object*&
  19.   FormField_Object*&
  20.   Button_Object*&
  21.   Table_Object*&
  22.   Cell_Object*&
  23.   Footnote_Object*&
  24.   Note_Object*&
  25.   Link_Object*
  26. )
  27. }
表125 属性としてのXMLElementプロパティ
名前 必須 説明
MarkupTag string XMLエレメントの<XMLTag>への参照(Self属性)
XMLContent string XMLエレメントの<Story>への参照。(Self属性)ストーリーの最上位にあるXMLエレメントでのみ使用できる
NoTextMarker XMLNoTextMarker_EnumValue <Table>エレメントおよび<Cell>エレメントで使用。これらのエレメントには関連付けられたマーカーがレイアウトにない
スキーマの例131 XMLAttribute
  1. XMLAttribute_Object = element XMLAttribute {
  2.   attribute Self { xsd:string },
  3.   attribute Name { xsd:string },
  4.   attribute Value { xsd:string }
  5. }
表126 属性としてのXMLAttributeプロパティ
名前 必須 説明
Name string 属性名
Value string 属性値
スキーマの例132 XMLInstruction
  1. XMLInstruction_Object = element XMLInstruction {
  2.   attribute Self { xsd:string },
  3.   attribute StoryOffset{  xsd:string }?,
  4.   attribute Target { xsd:string },
  5.   attribute Data { xsd:string }?
  6. }
表127 属性としてのXMLInstructionプロパティ
名前 必須 説明
StoryOffset string <XMLInstruction>エレメントの位置。<CharacterStyleRange>エレメントのSelf属性を参照
Target string ターゲット
Data string コンテンツ
スキーマの例133 XMLComment
  1. XMLComment_Object = element XMLComment {
  2.   attribute Self { xsd:string },
  3.   attribute StoryOffset{  xsd:string }?,
  4.   attribute Value { xsd:string }?
  5. }
表128 属性としてのXMLCommentプロパティ
名前 必須 説明
StoryOffset string <XMLInstruction>エレメントの位置。<CharacterStyleRange>エレメントのSelf属性を参照
Value string コンテンツ
スキーマの例134 DTD
  1. DTD_Object = element DTD {
  2.   attribute Self { xsd:string },
  3.   attribute StoryOffset{  xsd:string }?,
  4.   element Properties {
  5.     element Contents {
  6.       (string_type, xsd:string ) |
  7.       (enum_type, SpecialCharacters_EnumValue ) |
  8.       (object_type, xsd:string )
  9.     }?
  10.   }
  11.   ?
  12. }
表129 属性としてのDTDプロパティ
名前 必須 説明
StoryOffset string <XMLInstruction>エレメントの位置。<CharacterStyleRange>エレメントのSelf属性を参照
表130 エレメントとしてのDTDプロパティ
名前 必須 説明
Contents stringまたはSpecialCharactersenumeration コンテンツ

10.10 マッピング

<XMLExportMap>エレメントと<XMLImportMap>エレメントはタグからスタイル、スタイルからタグへのマッピングを定義します。XMLタグと段落スタイル、文字スタイルのマッピングの詳細は、InDesignのオンラインヘルプを参照してください。

スキーマの例135 XMLExportMap
  1. XMLExportMap_Object = element XMLExportMap{ 
  2.   attribute Self { xsd:string },
  3.   attribute MarkupTag{  xsd:string },
  4.   attribute MappedStyle{  xsd:string },
  5.   attribute IncludeMasterPageStories{  xsd:boolean }?,
  6.   attribute IncludePasteboardStories{  xsd:boolean }?,
  7.   attribute IncludeEmptyStories{  xsd:boolean }?
  8. }
表131 属性としてのXMLExportMapプロパティ
名前 必須 説明
MarkupTag string IDMLパッケージ内の<XMLTag>エレメントへの参照(Self属性)
MappedStyle string IDMLパッケージ内の<ParagraphStyle>エレメントまたは<CharacterSytle>エレメントへの参照(Self属性)
IncludeMasterPageStories boolean trueのとき、マスタースプレッドだけにあるストーリーをマップする
IncludePasteboardStories boolean trueのとき、ペーストボード上だけにあるストーリーをマップする
IncludeEmptyStories boolean trueのとき、空のコンテンツをマップする
IDMLの例86 XMLExportMap
  1. <XMLExportMap Self="dicd" MarkupTag=" XMLTag\cheading_1" MappedStyle=" ParagraphStyle\ cheading 1" IncludeMasterPageStories=" false" IncludePasteboardStories=" false" IncludeEmptyStories=" false"/>
スキーマの例136 XMLImportMap
  1. XMLImportMap_Object = element XMLImportMap{ 
  2.   attribute Self { xsd:string },
  3.   attribute MarkupTag{  xsd:string },
  4.   attribute MappedStyle{  xsd:string }
  5. }
表132 属性としてのXMLImportMapプロパティ
名前 必須 説明
MarkupTag string IDMLパッケージ内の<XMLTag>エレメントへの参照(Self属性)
MappedStyle string IDMLパッケージ内の<ParagraphStyle>エレメントまたは<CharacterSytle>エレメントへの参照(Self属性)
IDMLの例87 XMLImportMap
  1. <XMLImportMap Self="dicd" MarkupTag=" XMLTag\cheading_1" MappedStyle=" ParagraphStyle\ cheading 1"/>

10.11 タグ

<XMLTag>エレメントはXMLタグです。IDMLパッケージにおいて、タグはXMLフォルダのTags.xmlファイルで定義されています。XMLタグの作成と適用については、InDesignのオンラインヘルプを参照してください。

スキーマの例137 XMLTag
  1. XMLTag_Object = element XMLTag {
  2.   attribute Self { xsd:string },
  3.   attribute Name { xsd:string },
  4.   element Properties {
  5.     element TagColor{  InDesignUIColorType_TypeDef }?&
  6.     element Label { element KeyValuePair{  KeyValuePair_TypeDef }*
  7.     }?
  8.   }
  9.   ?
  10. }
表133 属性としてのXMLTagプロパティ
名前 必須 説明
Name string XMLタグ名
表134 エレメントとしてのXMLTagプロパティ
名前 必須 説明
TagColor InDesignUIColorType XMLタグのカラー。UIColorsの列挙かRGBそれぞれの<ListItem>エレメント
IDMLの例88 XMLTag
  1. <XMLTag Self="XMLTag\cbody_text" Name="body_text">
  2.   <Properties>
  3.     <TagColor type="enumeration">Yellow</TagColor>
  4.   </Properties>
  5. </XMLTag>
Personal tools