IDML 中 Story XML 的逻辑顺序

发布于 2024-12-19 13:23:14 字数 976 浏览 1 评论 0原文

我是 IDML 新手,我正在尝试理解这一点。

我发现 IDML 是包含多个 XML 文件的 zip 文件。 我打开了 designmap.xml 并在 Document 元素中看到了 StoryLine 属性。 但是,StoryLine 属性中的此顺序不一定与实际内容上显示的文本的逻辑顺序一致。

例如,IDML SDK 中的 BusinessCardTemplate 具有以下逻辑顺序:

John Doe
Software Developer
InDesign
Adobe Systems Incorporated
801 North 34th Street
Seattle, WA 98103
Phone: 206.675.7000
[email protected]
www.adobe.com

但是根据 StoryList 属性,以下是它引用的顺序:

Software Developer
InDesign
John Doe
[email protected]
www.adobe.com
Phone: 206.675.7000
801 North 34th Street
Seattle, WA 98103
Adobe Systems Incorporated

有没有办法从 IDML 的内容中找出了解这些故事的逻辑顺序(最好是从左上角到左下角)?

提前致谢

I am new to IDML and I am trying to understand this.

I have figured out that IDML is zip file containing multiple XML files.
I have opened the designmap.xml and saw the StoryLine attribute in Document element.
However, this order in the StoryLine atribute does not necessary agree with logical order of the text displayed on actual content.

For example the BusinessCardTemplate inside the IDML SDK has the following logical order:

John Doe
Software Developer
InDesign
Adobe Systems Incorporated
801 North 34th Street
Seattle, WA 98103
Phone: 206.675.7000
[email protected]
www.adobe.com

However according to the StoryList attribute the following is the order that it refers as following:

Software Developer
InDesign
John Doe
[email protected]
www.adobe.com
Phone: 206.675.7000
801 North 34th Street
Seattle, WA 98103
Adobe Systems Incorporated

Is there any way to figure out from the content of IDML to know the logical order (preferably from top left to bottom left) of those stories?

Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

转身以后 2024-12-26 13:23:14

故事只是文本内容,从文档中的使用中抽象出来。如果您想以正确的顺序获取故事,您需要:

1) 在解压的 IDML 文件的根目录中找到 designmap.xml(首先解压整个文件 - 我想您已经知道这一点)

2) 获取 Spreads 的顺序通过查找跨页元素:

<idPkg:Spread src="Spreads/Spread_uc6.xml" />

3) 在每个跨页文档中,获取 TextFrames 的顺序:

<TextFrame Self="uec" ParentStory="uda" PreviousTextFrame="n" NextTextFrame="n" ContentType="TextType" ... (many more parameters) ... />

4) 检查每个文本框架的 ParentStory 引用:

<TextFrame Self="uec" ParentStory="uda" ... />

5) 查找相关故事:在本例中它将是Stories/Story_uda.xml。

在一个简单的文档中,每个 TextFrame 都与一个故事相匹配,这将为您提供故事在文档中出现的顺序。

然而,在某些情况下 - 例如链接到单个故事的多个框架,或线程框架(其中一个故事被拆分为多个 TextFrame) - 这种映射不会那么简单。还要注意 MasterSpreads 引入的复杂性。

您会发现 Adob​​e IDML 文档很有用: http://www.adobe.com/ devnet/indesign/documentation.html#idml

The story is just the text content, abstracted from its use in the document. If you want to get stories in the right order, you need to:

1) Find designmap.xml in the root of your unpacked IDML file (unzip the whole thing first - I think you know this already)

2) Get the order of Spreads from it by finding the spread elements:

<idPkg:Spread src="Spreads/Spread_uc6.xml" />

3) Within each spread document, get the order of TextFrames:

<TextFrame Self="uec" ParentStory="uda" PreviousTextFrame="n" NextTextFrame="n" ContentType="TextType" ... (many more parameters) ... />

4) Check the ParentStory reference of each text frame:

<TextFrame Self="uec" ParentStory="uda" ... />

5) Find the related story: in this case it will be Stories/Story_uda.xml.

In a simple document, where each TextFrame is matched to one story, this will give you the order in which your stories appear in the document.

There are, however, some circumstances - such as multiple frames linked to a single story, or threaded frames, where one story is split over a number of TextFrames - where this mapping will not be so straightforward. Look out also for complexity introduced by MasterSpreads.

You will find the Adobe IDML documentation useful: http://www.adobe.com/devnet/indesign/documentation.html#idml

心奴独伤 2024-12-26 13:23:14

直接处理故事是相当困难的。如果您使用标记功能会更容易。打开 InDesign 文件并导入具有正确数据结构的 XML 文件。然后,您可以标记文档的各个部分以映射到 XML 节点。

完成此操作后,将文档导出到 IDML,然后查看 XML 目录中的 BackingStory.xml 文件,您将在其中找到如下所示的节点:

<XMLElement Self="di3i29" MarkupTag="XMLTag/Instructions" XMLContent="u16a" />

这定义了指令 XML 节点到 Story_u16a 的映射。 xml 文件。但是,您不再需要担心 Story,因为您现在已经可以访问将注入到 Story 中的节点值。

本教程介绍 InDesign XML 标记

Working directly with the Stories is quite difficult. It is easier if you use the Tagging features. Open your InDesign file and import an XML file with the correct structure for your data. You can then Tag the parts of the document to map to the XML nodes.

Once that is done export the document to IDML and then look in the XML directory at the file BackingStory.xml where you will find nodes like this:

<XMLElement Self="di3i29" MarkupTag="XMLTag/Instructions" XMLContent="u16a" />

This defines the mapping for the Instructions XML node into the Story_u16a.xml file. However you no longer need to worry about the Story because you now already have access to the node value that will be injected into the Story.

This tutorial explains the InDesign XML tagging.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文