Indesign 和 XML - 如何自动流入具有不同样式的多个页面?
我现在遇到了一点问题。我正在尝试使用 indesign (cs3) 和 xml。
基本上我有一个模板,它有 1 个主 dps,两个页面都有相同的数据(字段 1-5),但一个左对齐,一个右对齐 - 因此段落样式略有不同。我想要做的是导入 xml 并让 indesign 将数据从各个节点流到许多页面中。
例如 xml 格式:
root
day
field1
field2
field3
field4
field5
day
field1
field2
field3
field4
field5
day
...
我几乎可以通过在母版页上标记框架,然后创建页面并导入 xml 来完成这项工作,但是它仅将前 2 个节点重复地流入页面以计算所有节点的总数。
我还几乎可以通过从未标记的母版创建页面,然后使用 field1-5 标记标记框架,然后导入 xml 来使其工作。这填充了第一页,但是我找不到一种方法使其余数据流入新页面......
我错过了什么吗?我是不是一个彻头彻尾的傻瓜?如果有人可以提供任何帮助,我们将不胜感激......
I've got a bit of a problem at the moment. I'm trying to work with indesign (cs3) and xml.
Basically i have a template which is has 1 master dps, both pages have the same data (fields 1-5) but one is left aligned, one right - hence mildly different paragraph styles. What i want to be able to do is import xml and have indesign flow the data from the individual nodes into many pages.
eg xml format:
root
day
field1
field2
field3
field4
field5
day
field1
field2
field3
field4
field5
day
...
I can almost make this work by tagging the frames on the master pages, then creating pages and importing the xml, however it only flows the first 2 nodes into the pages reptitively for the total count of all the nodes.
I can also almost make it work by creating a page from the untagged masters and then tagging the frames with the field1-5 tags then importing the xml. This populates the first page, however i then can't find a way to make the rest of the data flow into new pages...
Am I missing something? Am I being a complete dumbass? If anyone can offer any help it will be greatly appreciated...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
在 Indesign 中转到
并选择进行勾选
放置复制文本时会自动转移到新页面
In Indesign go to
and select to be ticked
When placing copy text will flow on to new page automatically
引言:“然而,一个关键点是 Adobe® InDesign® CS2 永远不会创建新框架或添加页面来容纳新的 XML 元素。”是错误的。如果您正确设置布局,InDesign CS2+ 可以并且确实可以创建新的框架和页面。 CS 不会克隆元素或布局,但 CS2 可以并且确实如此。
InDesign 不会创建未链接或独立的框架。这些框架将链接在一起或内联。
既然除非打开它们,否则您看不到框架边缘,那么如果框架是内联的,会有什么区别呢?您可以使用段落“保留”选项创建它们并将它们传送到新页面。
吉姆
The Quote: "A key point, however, is that Adobe® InDesign® CS2 will never create new frames or add pages to accommodate new XML elements." is wrong. InDesign CS2+ CAN and DOES create new frames and pages if you set up your layout properly. CS doesn't clone elements or layouts, but CS2 can and does.
InDesign will NOT create unlinked or standalone frames. The frames will be either linked together OR inline.
Since you can't see frame edges unless you turn them on, what difference does it make if the frames are inline? You can create them and flow them to new pages by using Paragraph "Keep" options.
Jim
还有一个建议,不要在母版页上标记任何内容。如果您标记主页,则此处只能使用一个数据元素。它会出现在每个页面上。
相反,仅在正文页面上标记框架和占位符。数据可以从克隆元素流出,也可以同时流出。
《Adobe InDesign 和 XML 设计师指南》一书中对您需要的一切进行了解释。
如果您想构建 XML 表,最好的方法是使用 XSLT 文件来构建您想要的结构。
One more suggestion, don't tag anything on the master pages. If you tag the master page only one data element can be used here. It will appear on every page.
Instead, tag only frames and placeholders on the body pages. Data can flow from cloned elements or all at once.
Everything you need is explained in the book A Designer's Guide to Adobe InDesign and XML.
If you want to build XML tables, the best way is to use an XSLT file to build the structure you want.
上面的答案并不完全正确。您必须阅读整本书才能获得正确的信息。可以创建 XML 数据并将其传输到多个页面。上面的引用来自错误的部分。它正在谈论使用本书第4章中描述的“框架方法”。事实上,使用“流法”很容易做你想做的事情。
如果流程方法不能按您想要的方式工作,您可以使用 XSLT 构建您想要的方法。
The answer above is not wholly correct. You have to read the whole book to get the right info. It is possible to create and flow XML data to multiple pages. The quote above is from the wrong section. It is talking about using the "frame-method" described in chapter 4 of the book. In fact, it is easy to do what you want using the "flow-method".
If the flow method doesn't work the way you want you can build the method you want using XSLT.
引自《Adobe InDesign 和 XML 设计师指南》:
不过它基于 CS3,因此可能有 CS4 或 CS5 的选项。我想这意味着唯一的选择是使用 IDML。这看起来相当复杂,但它可能会完成工作。
引自“Adobe InDesign CS3 和 XML:技术参考”< /a>
...这表明这是可以做到的。
但话又说回来,来自“为重复内容创建占位符”
那么,最终的判决是什么?仔细阅读和重读所有内容,我得到的印象是他们在说:
因此,如果您真正想要实例化多个页面,我认为除了将设计导出到 IDML 并拥有某种处理器修改 IDML 文件的内容。
Quote from "A Designers Guide to Adobe InDesign and XML":
It's based on CS3 though, so there might an an option in CS4 or CS5. I guess that means the only alternative is to use IDML. That seems rather complicated, but it might get the job done.
Quote from "Adobe InDesign CS3 and XML:A Technical Reference"
... which suggests that it can be done.
But then again, from "Create placeholders for repeating content"
So, what's the final verdict? Reading and rereading everything carefully, I get the impression that this is what they are saying:
So, if you truly want to instantiate multiple pages, I think there is no other option than to export your design to IDML and have some sort of processor modify the contents of the IDML files.
您需要确保在故事编辑器中,标签准确反映根目录下
XML
中的标签。在您的示例中,这可能涉及在
field1
、field2
等标记周围添加“day
”标记。然后,当您使用克隆重复文本元素时,所有日期都将包括在内。
You need to make sure that in your story editor, the tags accurately reflect the tags in your
XML
below the root.In your example, this will probably involve adding a '
day
' tag around yourfield1
,field2
, etc. tags.Then when you use clone repeating text elements, all the days will be included.
我意识到这是一个较老的问题,但我相信我在这里有一些见解。
InDesign 将根据 XML 文件的大小创建框架和页面。
这是如何...
我在这个答案中引用了 CS6,但我从 CS3 开始已经这样做了很多年。
确保您的 Indd 模板至少有 2 页。这些可以是镜像左右布局的母版页。这些页面必须具有相同的主要文本框架。这是创建新文档时的一个选项。
照常导入您的 XML。请务必勾选您的 XML 工作流程所需的所有选项。
将 XML 放入主文本框架中。由于我通常会流动整个文档,因此我选择根元素并拖动到框架,但这适用于您选择的任何节点。
如果 XML 的内容大于框架可以支持的大小,框架右下角的方框中将会出现一个红色加号 (+)。单击加号,您将看到一个箭头,其中包含纸张图标和 XML 内容的表示。
转到第 2 页上的文本框架。如果您只需在框架内单击,InDesign 将流动适合该框架的尽可能多的内容,您需要通过添加页面并将内容放置到末尾来再次重复该过程.
但是,如果在放置内容时按住 SHIFT,纸张图标将变为漩涡箭头。放置后,InDesign 会将内容自动排列到左页和右页,直到 XML 选择结束。如果您有母版页,它将在整个左侧和右侧使用这些页面。
如果您将标签映射到样式,则样式将显示在页面上。
关于将标签映射到样式的一点说明...在放置内容之前执行标签/样式映射。否则,InDesign 将需要重新绘制页面。这是一项内存密集型操作,并且可能会导致 InDesign 崩溃,具体取决于您的文件大小。如果有什么不同的话,那就是比在放置之前映射样式所需的时间要长得多。
我希望这对某人有帮助。我还没有在 Adobe 或任何其他论坛中看到此操作的记录。 InDesign 中有许多未记录的操作和功能,尤其是与 XML 相关的操作和功能。
I realize that this is an older question, but I believe I have some insight here.
InDesign will create frames and pages based on the size of an XML file.
Here is how...
I'm referencing CS6 for this answer, but I've done this for years beginning in CS3.
Ensure your Indd template has at least 2 pages. These can be master pages mirroring right and left layouts. The pages must have the same primary text frame. This is an option when you create a new document.
Import your XML as usual. Be sure to tick off any options you need per your XML workflow.
Place the XML into the primary text frame. Since I typically flow entire documents, I select the root element and drag to the frame, but this will work on any node you select.
IF the content of the XML is larger than the frame can support, there will be a red plus sign (+) in a square box towards the bottom right of the frame. Click the plus sign and you'll get an arrow containing an paper icon and a representation of your XML content.
Goto the text frame on page 2. if you simply click inside the frame, InDesign will flow as much content as will fit in that frame and you'll need to repeat the process again by adding pages and placing content to the end.
However, if you hold down the SHIFT as you place the content, the paper icon will change to a swirly arrow. After you place, InDesign will autoflow the content to left and right pages until the end of the XML selection. If you have master pages, it will use those pages for the left and right throughout.
If you have your tags mapped to styles, the styles will display on the pages.
One note about mapping tags to styles...Perform your tag/style mapping prior to placing content. Otherwise, InDesign will need to redraw the pages. This is a memory-intensive action and could crash InDesign depending on your file size. If anything, it will take much longer than if you had mapped the styles before placement.
I hope this helps someone. I haven't seen this action documented by Adobe or in any other forums. There's many undocumented actions and features in InDesign especially concerning XML.