: Include assignments when exporting XML from InDesign When exporting XML from InDesign, I'd like assignments to show up as parent elements without manual intervention. What I get now for a page
When exporting XML from InDesign, I'd like assignments to show up as parent elements without manual intervention.
What I get now for a page that has three stories in two assignments:
<Root>
<Story>
<Headline>Foo</Headline>
<Body>Bar</Body>
</Story>
<Story>
<Headline>Foo2</Headline>
<Body>Bar2</Body>
</Story>
<Story>
<Headline>Foo3</Headline>
<Body>Bar3</Body>
</Story>
</Root>
What I'd like to get:
<Root>
<Assignment>
<Story>
<Headline>Foo</Headline>
<Body>Bar</Body>
</Story>
<Story>
<Headline>Foo2</Headline>
<Body>Bar2</Body>
</Story>
</Assignment>
<Assignment>
<Story>
<Headline>Foo3</Headline>
<Body>Bar3</Body>
</Story>
</Assignment>
</Root>
More posts by @Cooney243
1 Comments
Sorted by latest first Latest Oldest Best
Use this xsl on export
<?xml version="1.0" encoding="UTF-8"?>
<xsl:template match="/">
<xsl:apply-templates select="*"/>
</xsl:template>
<xsl:template match="Story">
<Assignment>
<xsl:copy-of select="."></xsl:copy-of>
</Assignment>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.