Linebreak in Indesign xsl?

Hey guys,
I have a little question about xsl. I tried to solve it myself, but I can't get it done.
My xsl looks like this:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
xmlns:ex="example">
    <xsl:output method="xml" omit-xml-declaration="yes" encoding="UTF-8" indent="yes" />
    <xsl:template match="@*|node()">
        <xsl:copy>
            <xsl:apply-templates select="@*|node()"/>
        </xsl:copy>
    </xsl:template>
    <xsl:template match="*[local-name() = 'table']"/>
    <xsl:template match="*[local-name() = 'text']">
        <xsl:copy>
            <xsl:attribute name="value">
                <xsl:apply-templates/>
            </xsl:attribute>
        </xsl:copy>
    </xsl:template>
    <xsl:template match="*[local-name() = 'b' or local-name() = 'i']">
        <xsl:value-of select="concat('[',local-name(),']')"/>
            <xsl:apply-templates/>
        <xsl:value-of select="concat('[/',local-name(),']')"/>
    </xsl:template>
    <xsl:template match="@value">
         <xsl:attribute name="value">
             <xsl:value-of select="translate(.,'&#xd;','&#xa;')"/>
         </xsl:attribute>
    </xsl:template>
    <xsl:template match="@href"/>
</xsl:transform>
What I found out, is that I could use something like this:
<xsl:if test="not(position()=last())">
    <xsl:text>&#xA;</xsl:text>
</xsl:if>
But I don't know how to combine it with my xsl. I tried to just put it in the "<xsl:attribute name="value">" xsl:copy part. It inserts a linebreak, but at the wrong place. Also I cant put it inside of "xsl:apply-templates".
Would someone be so kind to tell me, where I have to add this code?
A xml example(how it looks originally, without any transforms):
<text>This is some text and here
is a linebreak</text>
Should look like:
<text value="This is some text and here&#xA;is a linebreak"/>
Currently looks like:
<text value="This is some text and here
is a linebreak"/>
Thank you in advance!

Thanks for the reply.
I can try to do it in a xsl v.1 but not quite sure how that would be done. Thing is I am trying to take a spreadsheet and convert it to xml which is each item(row) as a seperate item in the xml. I need to convert that xml so that I can drop it into indesign and into a table. It works if I let oxygen convert it with the xsl but in indesign I import it into a current table but the problem is it starts repeating the first item in the xml over and over again if the previous table has more rows than the current table.
I some how need to convert the xml file from excel into an acceptable indesign xml table format. Thats the tricky part with the way excel handles the information. No Lists inside of lists allowed.

Similar Messages

  • HTML linebreak br in xsl

    I want to render a xml document into html using xsl.
    My question is how do I create a html linebreak in the xsl
    document that will be successfully parsed?
    I tried
    , but this gets rendered as
    </br> which
    result in a double linebreak in the browser.
    I also tried the
    tag and <xsl:text>
    </xsl:text>
    without success. In the latter case the "<" gets rendered as
    &#60; as discussed in this forum.
    Is there some other nice way to do it?
    Thanks for your time,
    /Fredrik
    null

    May I rephrase my question.
    Does the XSL Processor support the W3C standard stated at
    http://www.w3.org/TR/xslt#section-HTML-Output-Method
    I use
    <xsl:output method="html"/>
    in my XSL document, still the
    tag
    gets rendered as
    </br>
    Thanks for your time,
    /Fredrik
    Fredrik Andreasson (guest) wrote:
    : I want to render a xml document into html using xsl.
    : My question is how do I create a html linebreak in the xsl
    : document that will be successfully parsed?
    : I tried
    , but this gets rendered as
    </br> which
    : result in a double linebreak in the browser.
    : I also tried the
    tag and <xsl:text>
    </xsl:text>
    : without success. In the latter case the "<" gets rendered as
    : &#60; as discussed in this forum.
    : Is there some other nice way to do it?
    : Thanks for your time,
    : /Fredrik
    null

  • Do you need to generate HTML table rows from XML in InDesign?

    General issue: you export XML and you get a bunch of content for xml elements that were a table in inDesign. But they don't have any rows, just cell after cell. What will make rows in your output?
    Solution: XSLT; you need to use the @aid:tcols attribute of exported XML to determine the number of columns that your table should be. This is written in XSLT 1.1 so it shoud work with an export from InDesign. If you have problems with using it on export of XML, try using it on the XML afetr it has been exported, in Oxygen or other XSLT processor. Best to save acopy of your files before using the XSLT with them.  Copy all of the plain text and past into a new file, save with your own filename, ending with .xsl file extension. Then when exporting XML from InDesign CS3-5, browse to your new .xsl file and select it. PLEASE read about XSLT files at w3c.schools or other resource if you want to understand what is going on with this file.
    BTW <!-- indicates comments in code -->
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- NO WARRANTY that this example code will work as written for your XML file in InDesign. You can add more templates to the output to map your heading styles to h1, h2, etc. -->
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1"
        xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/"
        xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/" exclude-result-prefixes="xsl aid aid5">
        <xsl:output method="html" indent="yes" encoding="UTF-8"
            doctype-public="http://www.w3.org/TR/xhtml/DTD/xhtml-transitional.dtd"/>
    <!-- parameter to use the name of element with attribute aid:theader as the th output -->
        <xsl:param name="tableElem">//*[local-name()][@aid:table='table']</xsl:param>
        <xsl:param name="colheadStyle">
            <xsl:value-of select="//*[local-name()][@aid:theader][1]"/>
            <!-- i.e. colHead-->
        </xsl:param>
    <!-- parameter to use the name of element with attribute aid:cell but not aid:theader as the td  output -->
    <!--i.e. tabletext or whatever the name of your Cell level  element is in InDesign -->
        <xsl:param name="cellStyle">
            <xsl:value-of select="//*[local-name()][@aid:table='cell' and not(@aid:theader)][1]"/>
        </xsl:param>
        <!-- handles a Story element marked up with HTML-type elements, but uses the <Table> element of IDD  -->
        <!-- if a true HTML table is in the content, it will be passed through -->
        <xsl:template match="Story"><!-- make a basic HTML file from a Story -->
            <html>
                <head>
                    <title>Sample Table</title>
                </head>
                <body>
                    <xsl:apply-templates><!-- will handle direct text of the  <Story>, and <Table> -->
                        <xsl:with-param name="colheadStyle" select="$colheadStyle"/>
                        <xsl:with-param name="cellStyle" select="$cellStyle"/>
                    </xsl:apply-templates>  
                </body>
            </html>
        </xsl:template>
       <!-- use the styles to find the elements of IDD <Table> element -->
        <xsl:template match="Table">
            <xsl:param name="colheadStyle">
                <xsl:value-of select="$colheadStyle"/>
            </xsl:param>
            <xsl:param name="cellStyle">
                <xsl:value-of select="$cellStyle"/>
            </xsl:param>
            <xsl:variable name="cellsPerRow">
                <xsl:value-of select="@aid:tcols"/>
            </xsl:variable>
            <table><!-- start the table -->
                <!-- xhtml requires lower-case name for table element-->
                <tr>
                    <xsl:apply-templates select="*[@aid:theader='']">
                        <xsl:with-param name="colheadStyle" select="$colheadStyle"/>
                        <xsl:with-param name="cellStyle" select="$cellStyle"/>
                    </xsl:apply-templates>
                </tr>
                <!--  and @aid:style=$cellStyle -->
                <xsl:for-each
                    select="*[@aid:table='cell'][not(@aid:theader='')][position() mod $cellsPerRow = 1]">
    <!-- some code adapted with  permission, from http://www.computorcompanion.com/LPMArticle.asp?ID=202
    Building HTML Tables with XSL by James Byrd; please include this acknowledgement in all files that use his code -->
    <!-- this is the tricky bit of the code that James Byrd set up
    p-class-tabletext-[position() mod $cellsPerRow = 1 continues looping until the position of the active element divided by $cellperRow (@aid:tcols value) tried with [@aid:style=$cellStyle] has a remainder of 1 -->
    <!--  .|following-sibling::p-class-tabletext-[position() &lt;  $cellsPerRow] applies first to the currently selects cell with "." then continues with the following-siblings whose position is less than  the value of cells per row (@aid:tcols value) -->
                    <tr>
                        <xsl:apply-templates
                            select=".|following-sibling::*[@aid:table='cell'][not(@aid:theader='')][position() &lt; $cellsPerRow]"
                        />
                    </tr>
                </xsl:for-each>
            </table>
        </xsl:template>
        <xsl:template match="*">
            <xsl:param name="colheadStyle">
                <xsl:value-of select="$colheadStyle"/>
            </xsl:param>
            <xsl:param name="cellStyle">
                <xsl:value-of select="$cellStyle"/>
            </xsl:param>
            <xsl:variable name="cellsPerRow">
                <xsl:value-of select="parent::Table/@aid:tcols"/>
            </xsl:variable>
            <xsl:choose>
                <!-- colHead aid:table="cell" aid:theader=""-->
                <xsl:when test="parent::Table and @aid:theader">
                    <th>
                        <xsl:apply-templates>
                            <xsl:with-param name="colheadStyle" select="$colheadStyle"/>
                            <xsl:with-param name="cellStyle" select="$cellStyle"/>
                        </xsl:apply-templates>
                    </th>
                    <xsl:if test="(position() = last()) and (position() &lt; $cellsPerRow)">
                        <xsl:call-template name="FillerCells">
                            <xsl:with-param name="cellCount" select="$cellsPerRow - position()"/>
                        </xsl:call-template>
                    </xsl:if>
                </xsl:when>
                <xsl:when test="parent::Table and @aid:table='cell' and not(@aid:theader)">
                    <td>
                        <xsl:apply-templates>
                            <xsl:with-param name="colheadStyle" select="$colheadStyle"/>
                            <xsl:with-param name="cellStyle" select="$cellStyle"/>
                        </xsl:apply-templates>
                    </td>
                    <xsl:if test="(position() = last()) and (position() &lt; $cellsPerRow)">
                        <xsl:call-template name="FillerCells">
                            <xsl:with-param name="cellCount" select="$cellsPerRow - position()"/>
                        </xsl:call-template>
                    </xsl:if>
                </xsl:when>
    <!-- for non-table elements this generic element handler will  pick up an aid:pstyle (if present) and create a class attribute from it. Works for any element that has the same name as HTML element such as <p> but it doesn't add wrapper elements like <ul> or <ol> for lists. -->
                <xsl:otherwise>
                    <xsl:element name="{name()}">
                        <xsl:if test="@aid:pstyle">
                            <xsl:attribute name="class">
                                <xsl:value-of select="@aid:ptyle"/>
                            </xsl:attribute>
                        </xsl:if>
                        <xsl:apply-templates>
                            <xsl:with-param name="colheadStyle" select="$colheadStyle"/>
                            <xsl:with-param name="cellStyle" select="$cellStyle"/>
                        </xsl:apply-templates>
                    </xsl:element>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:template>
        <!-- take care of text that is a direct child of the <Story> by wrapping it in a <p> to make valid HTML -->
        <xsl:template match="text()">
            <xsl:variable name="myString">
                <xsl:value-of select="string-length(normalize-space(.))"/>
            </xsl:variable>
            <xsl:choose>
                <xsl:when test="parent::Story">
                    <xsl:if test="$myString > 0">
                        <xsl:element name="p">
                            <xsl:attribute name="class">text</xsl:attribute>
                            <xsl:value-of select="normalize-space(.)"/>
                        </xsl:element>
                    </xsl:if>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:value-of select="normalize-space(.)"/>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:template>
       <!-- make br element conform to good HTML markup -->
        <xsl:template match="br">
            <br />
        </xsl:template>
        <!-- this recursive template calls itself until its test condition is satified -->
        <!-- it outputs a cell whose only content is a non-breaking space -->
        <!-- do not use   in place of Unicode &#160; for the non-breaking space -->
        <!-- the value of $cellCount is set in the main XSL template -->
        <xsl:template name="FillerCells">
            <xsl:param name="cellCount"/>
            <td>&#160;</td>
            <xsl:if test="$cellCount > 1">
                <xsl:call-template name="FillerCells">
                    <xsl:with-param name="cellCount" select="$cellCount - 1"/>
                </xsl:call-template>
            </xsl:if>
        </xsl:template>
    </xsl:stylesheet>
    Message was edited by: HoneoyeFalls
    Sample XML file exported from IDD
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Story><Table xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/" aid:table="table" aid:trows="2" aid:tcols="2"><colHead aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="44">1 colHead</colHead><colHead aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="56">2 colHead</colHead><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="44">1 tabletext</tabletext><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="56">2 tabletext</tabletext><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="44">row 2 1 tabletext</tabletext><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="56">row 2 2 tabletext</tabletext></Table>
    <table><tr><th>normal HTML table heading</th></tr>
    <tr><td>normal HTML table<br/>cell text</td></tr></table></Story>

    You can use RECORD type declaration:
    SQL> declare
      2   type rec_type is record (
      3    ename emp.ename%type,
      4    sal emp.sal%type
      5   );
      6   type rc is ref cursor return rec_type;
      7   rc1 rc;
      8   rec1 rec_type;
      9  begin
    10   open rc1 for select ename, sal from emp;
    11   loop
    12    fetch rc1 into rec1;
    13    exit when rc1%notfound;
    14    dbms_output.put_line(rec1.ename || ' ' || rec1.sal);
    15   end loop;
    16   close rc1;
    17  end;
    18  /
    SMITH 800
    ALLEN 1600
    WARD 1250
    JONES 2975
    MARTIN 1250
    BLAKE 2850
    CLARK 2450
    SCOTT 3000
    KING 5000
    TURNER 1500
    ADAMS 1100
    JAMES 950
    FORD 3000
    MILLER 1300or use, for example, VIEW to declare rowtype:
    SQL> create view dummy_view as select ename, sal from emp;
    View created.
    SQL> declare
      2   type rc is ref cursor return dummy_view%rowtype;
      3   rc1 rc;
      4   rec1 dummy_view%rowtype;
      5  begin
      6   open rc1 for select ename, sal from emp;
      7   loop
      8    fetch rc1 into rec1;
      9    exit when rc1%notfound;
    10    dbms_output.put_line(rec1.ename || ' ' || rec1.sal);
    11   end loop;
    12   close rc1;
    13  end;
    14  /
    SMITH 800
    ALLEN 1600
    WARD 1250
    JONES 2975
    MARTIN 1250
    BLAKE 2850
    CLARK 2450
    SCOTT 3000
    KING 5000
    TURNER 1500
    ADAMS 1100
    JAMES 950
    FORD 3000
    MILLER 1300 Rgds.

  • INDESIGN CC TEXT TAGGING PROBLEM

    I currently import text primarily from Filemaker which tags the data then manipulate it in word so that when brought into Indesign, the styles sheets set are put to the text once we have included the heading of <ASCII-MAC>. We have just upgraded to creative cloud and now we dont seem to be able to import any text at all. The most I can do is bring in the text as a word document therefore no styles allocated and useless tagging codes showing. Example of the text we used to import from word as text only:
    <ASCII-MAC>
    <pstyle:Title>
    The Economics of European Integration
    <pstyle:Subtitle>
    Limits and Prospects
    <pstyle:Affiliation>
    Miroslav N. Jovanovi , United Nations Economic Commission for Europe, Geneva and University of Geneva, Switzerland
    <pstyle:Text>
    ‘In this well-researched, comprehensive account of the development of the European Union (EU), Jovanovic presents details of the progress made toward economic integration and considers aspects of the political future of the EU, e.g., the impact of the recent admission of ten additional member nations. . . A valuable resource for individuals interested in, and courses dealing with, international economics of the history and politics of modern Europe. Highly recommended.’
    – G.T. Potter, Choice
    It is of paramount importance that European firms, investors and countries, take into consideration the implications, changes and opportunities of European integration in their decision-making processes. This is reinforced by the fact that the EU has been continuously evolving and enlarging. This textbook is one of the first to cover the subject of the economics of the EU, including all 25 member countries as well as several other potential candidate countries.
    <pstyle:Contents>
    Contents: Preface  1. The Origin, Evolution and Prospects for the European Union  2. Monetary Integration  3. Fiscal Policy and the Budget  4. Common Agricultural Policy  5. Competition Policy  6. Industrial Policy in Manufacturing and Services  7. Trade Policy  8. Spatial Location of Production and Regional Policy  9. Capital Mobility  10. Mobility of Labour  11. Social Policy  12. Environment Policy  13. Transport Policy  14. Eastern Enlargement  15. Conclusion   Bibliography Index
    <pstyle:ISBNs>
    2005
    944 pp
    Can anyone offer any help as this is now preventing me from doing anything.
    Thanks

    The correct format is:
    <ASCII-MAC>
    <vsn:9>
    (ie, the text encoding in one line and the ID tagged file version in the next)
    You ended up with an empty text frame because the your source file has "Classic Mac" linebreaks. InDesign CC requires that tagged files have Unix linebreaks.
    As far as I know, MS Word doesn't offer the option to choose the line endings of text files (at least my old Mac Word 2004 doesn't). If your version allows that, you're set. If not, you can open your file in a text editor that enables linebreak options, like the free Text Wrangler or its paid big brother BBEdit. Alternatively, you can use a utility like LineBreak ( https://www.macupdate.com/app/mac/12045/linebreak ) to do the conversion in a convenient drag-and-drop operation.
    Another advice: don't put the paragraph style tag in one line and its correspondent paragraph in the next line. Your original sample:
    <pstyle:Title>
    The Economics of European Integration
    <pstyle:Subtitle>
    Limits and Prospects
    when imported as is, will ended up with unnecessary blank lines. This happens because you're telling InDesign to:
    apply the paragraph style Title,
    insert a paragraph return
    insert the string "The Economics of European Integration"
    insert a paragraph return
    apply the paragraph style Subtitle,
    insert a paragraph return
    insert the string "Limits and Prospects"
    insert a paragraph return
    The blank lines you'll see in the final result in ID are caused by the paragraph returns that exist in your tagged file, right afther the paragraph style tag (highlighted in bold above).
    The proper usage follows:
    <pstyle:Title>The Economics of European Integration
    <pstyle:Subtitle>Limits and Prospects
    By formatting the tagged file this way, you'll avoid those extra blank lines.
    Hope it helps.

  • ANN: Indesign CS3 JS help to HTML using XSLT

    I felt quite at home with the previous CS's JS Help PDFs, but I'm not too wild about the ExtendScript editor. But if you don't use that, you miss out the online help! Fortunately, in one of the ExtendScript subfolders you can find an XML document with the slightly bizarre name "omv$indesign-5.0-en_us.xml". This contains the
    entire help document, in handy XML format.
    As an exercise, I wrote an extensive XSL stylesheet to convert it to fully cross-referenced HTML. This script is a bit too long to include here, but you can d/l it at
    http://www.jongware.com/binaries/indesign.xsl.
    Run it through your favourite XSL processor, and you get the whole thing in one huge file. Alternatively, you can select either a single class or enumeration (such as "TextFrame") or a single alphabetic letter ("A", just to provide an example, will process all classes and enums from "AlignDistributePreference" to "AutoEnum"). In these cases, the hyperlinks will (obviously/unfortunately) fail.
    It is quite possible to load the 113,000 line XML into InDesign and apply formatting to it, but I think I'll leave it at this.

    I sure had fun 'tokenizing' the "Can accept: xx, yy or zz" remarks for the "any" value into separate entries :) Only for Properties, though, since with most of the Methods you changed the wording. Please, for the next version, a list of these possible elements in the XML!
    Some new items added: a full index (only if you check it in the XSL--it's quite long); more importantly, per class a list of "Element of", "Returned by", and "Used in", all hyperlinked to the extreme -- now you can see at a glance how all elements link together! These lists are not
    entirely complete (that's your (Ole's) fault, because of that "any" notation).
    [PS: there seem to be no explanation of function return values...]
    I understand the idea of the SVG block diagrams, and if I feel the urge (and have an example of what it should look like) I might give that a try -- just for laffs. In the mean time I'm finally gonna upgrade my CS1/2 scripts, using my own HTML to guide me :)
    For the XSLT impaired amongst us, d/l the complete HTML page at jongware.com:
    indesign.zip (3.5MB, zipped to 471Kb). Enjoy!

  • Indesign text tagging

    Hi
    Is it possible to tag a portion of text, so a Text or Word object without it sitting in a Story?
    Something like this.
    var app:Application = InDesign.app;
    var doc:Document = app.activeDocument;
    var root:XMLElement = doc.xmlElements.firstItem()
    var selection:Object = doc.selection[0];
    var node:XMLElement = root.xmlElements.add("MyTagName");
    XMLElement(node).markup(selection);
    This throws the following error
    Error: Cannot change the element to be associated with this object. Try creating a new element.
    or
    var node:XMLElement = root.xmlElements.add("MyTagName", selection);
    puts the new element inside a Story element.
    Thanks for any help.

    The correct format is:
    <ASCII-MAC>
    <vsn:9>
    (ie, the text encoding in one line and the ID tagged file version in the next)
    You ended up with an empty text frame because the your source file has "Classic Mac" linebreaks. InDesign CC requires that tagged files have Unix linebreaks.
    As far as I know, MS Word doesn't offer the option to choose the line endings of text files (at least my old Mac Word 2004 doesn't). If your version allows that, you're set. If not, you can open your file in a text editor that enables linebreak options, like the free Text Wrangler or its paid big brother BBEdit. Alternatively, you can use a utility like LineBreak ( https://www.macupdate.com/app/mac/12045/linebreak ) to do the conversion in a convenient drag-and-drop operation.
    Another advice: don't put the paragraph style tag in one line and its correspondent paragraph in the next line. Your original sample:
    <pstyle:Title>
    The Economics of European Integration
    <pstyle:Subtitle>
    Limits and Prospects
    when imported as is, will ended up with unnecessary blank lines. This happens because you're telling InDesign to:
    apply the paragraph style Title,
    insert a paragraph return
    insert the string "The Economics of European Integration"
    insert a paragraph return
    apply the paragraph style Subtitle,
    insert a paragraph return
    insert the string "Limits and Prospects"
    insert a paragraph return
    The blank lines you'll see in the final result in ID are caused by the paragraph returns that exist in your tagged file, right afther the paragraph style tag (highlighted in bold above).
    The proper usage follows:
    <pstyle:Title>The Economics of European Integration
    <pstyle:Subtitle>Limits and Prospects
    By formatting the tagged file this way, you'll avoid those extra blank lines.
    Hope it helps.

  • Xml indents vs tabs in InDesign: whitespaces & linebreaks

    Hi hello!
    My name is Steven and I have an issue concerning working with XML for use in InDesign.
    I've made a valid .xml document structured with tags, so I can use the tags for rendering the lay-out (using InDesign styles).
    The mapping works well, but the hangups are whitespaces and line breaks.
    Now, what's a bit confusing is the fact that when I import the XML file into my InDesign document, it renders aswell the used tabs of my XML file.
    Basically InDesign seems to pick up whatever whitespace and linebreaks are found in the XML files.
    But these are meaningless to XML and HTML, so why does InDesign treat and XML file as if it's a formatted document?
    I found some whitespace handlings such as <?whitespace-handling use-characters?> but they don't work for me...
    Perhaps it's something I'm doing wrong? I just want InDesign to keep the linebreaks I'm using in my XML file, but not to use the tabs i'm using in XML as they just are necessary to keep the overview (legibiltiy) of my structured XML file.
    If someone wants so snif in my project it's possible by using the following link:
    https://www.dropbox.com/s/oaqk31yr1aykf5y/xml-sip.zip
    I appreciate your comments!
    Othere related/simular issues: http://www.justskins.com/forums/xml-import-whitespace-and-78216.html

    Six_Steven,
    The past three and some hours I've been struggling with the exact same issue. I want *some* of the white space imported (at the end of tags that translate to paragraphs) but not *all* (i.e., in my source about every major XML element ends with a hard return).
    This post
    http://forums.adobe.com/thread/510602
    gave me the crucial hint. Here is what I did: uncheck "Import white-space only elements". That way, you get everything on the same line. That's what I wanted  because I also have a simple XSLT file that basically says
    <xsl:template match="title"><title><xsl:apply-templates /><xsl:text>
    </xsl:text></title></xsl:template>
    for each of the elements where I do want a hard return at the end. Note the <xsl:text>..</xsl:text>, which contains only a single Return. This is "the" trick; all redundant white space is removed, and this one command inserts it where needed.
    (Edit) oh wait ... I needed "only one more thing" with this. And, naturally, this trick works three times but I cannot get it to work a fourth time.
    (Edit #2) Solved, after another 2 hours or so of teeth-grinding and hair-pulling.
    The trick seems to be:
    1. Do not use InDesign's own 'ignore whitespace'. It's worthless, in the sense it's an all-or-nothing option -- and you don't want either.
    2. Using XSLT, remove all whitespace inside all elements using
    <xsl:template match="text()"><xsl:value-of select="normalize-space()"/></xsl:template>
    3. .. and selectively maintain whitespace where you want it using
    <xsl:template match="saveInside//text()"><xsl:value-of select="."/></xsl:template>
    where saveInside is the name of the main XML tag in which you do want the original whitespace to remain.

  • Xsl:copy-of output without linebreak

    Hi,
    I have trouble with the copy-of element. If I try to output a node fragment then the output is done with linebreaks. How can I do this without breaks?
    XML:
    <MESSAGE><USERCONTENT><b101>Hello World</b101><l100>Line1</l100></USERCONTENT></MESSAGE>
    XSL:
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" version="1.0"/>
    <xsl:template match="/">
    <xsl:apply-templates/>
    </xsl:template>
    <xsl:template match="USERCONTENT">
    <xsl:copy-of select="node()"/>
    </xsl:template>
    </xsl:stylesheet>
    OUTPUT ACTUAL:
    <b101>Hello World</b101>
    <l100>Line1</l100>
    OUTPUT TARGET:
    <b101>Hello World</b101><l100>Line1</l100>
    Attack

    OK, wait... if you're using XMLType methods then it's expected behaviour :
    http://docs.oracle.com/cd/B19306_01/appdev.102/b14259/xdb04cre.htm#i1024803
    The following rules govern pretty-printing of results:
    - SQL functions never pretty-print.
    - XMLType methods (member functions) extract() and transform() always pretty-print.
    - All other XMLType methods and all PL/SQL functions in packages DBMS_XMLDOM and DBMS_XSLPROCESSOR pretty-print if the data is stored object-relationally; otherwise (CLOB storage), they do not pretty-print.Use SQL function XMLTransform instead.

  • Indesign and xsl not cooperating

    Got a new problem with importing xml with xsl into a table in indesign.
    The job works when I use oxygen to make a new xml file from the xml/xsl files.
    Problem is I want to bypass oxygen and have indesign do it on its own.
    XML:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Root>
        <Story>
            <TableSection xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" aid:table="table"
                aid:trows="2" aid:tcols="6">
                <SectionCode aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1"
                    aid:ccolwidth="30.908648796453704">01</SectionCode>
                <SectionName aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="5"
                    >FRAME</SectionName>
                <Code aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="30.908648796453704"
                    >PD</Code>
                <ItemNum aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="100.42931416650917"
                    >IN054B</ItemNum>
                <Vendor aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="78.3">ALI ARC
                    (AN)</Vendor>
                <Description aid:table="cell" aid:crows="1" aid:ccols="1"
                    aid:ccolwidth="167.39999999999998">AliArc 92/9400 Bumper &apos;97 &amp;
                    Up</Description>
                <Price aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="71.56323531584569"
                    >$2,350.00</Price>
                <Photo aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="90.39880172119148">
                    <Picture
                        href="file:///Y:/M/Maxim/Parts%20Catalog/Design/Indesign/TIRE%20CHAINS%20(NEW%20PARTS).jp g"
                    />
                </Photo>
            </TableSection>
        </Story>
    </Root>
    XSL:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl" version="1.0">
        <xsl:output method="xml" omit-xml-declaration="no" indent="yes" encoding="US-ASCII"/>
        <xsl:decimal-format name="money" digit="D"/>
        <xsl:key name="SectionKey" match="Story" use="SectionName"/>
        <xsl:template match="/">
            <Root>
                <Story>
                    <xsl:for-each
                        select="//Story[generate-id(.)=generate-id(key('SectionKey',SectionName))]">
                        <TableSection xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/"
                            aid:table="table" aid:tcols="6">
                            <xsl:attribute name="aid:trows">
                                <xsl:value-of select="TableRows"/>
                            </xsl:attribute>
                            <SectionCode aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1"
                                aid:ccolwidth="30.908648796453704">
                                <xsl:value-of select="SectionCode"/>
                            </SectionCode>
                            <SectionName aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="5">
                                <xsl:value-of select="SectionName"/>
                            </SectionName>
                            <xsl:for-each select="key('SectionKey',SectionName)">
                                <Code aid:table="cell" aid:crows="1" aid:ccols="1"
                                    aid:ccolwidth="30.908648796453704">
                                    <xsl:value-of select="Code"/>
                                </Code>
                                <ItemNum aid:table="cell" aid:crows="1" aid:ccols="1"
                                    aid:ccolwidth="100.42931416650917">
                                    <xsl:value-of select="ItemNum"/>
                                </ItemNum>
                                <Vendor aid:table="cell" aid:crows="1" aid:ccols="1"
                                    aid:ccolwidth="78.3">
                                    <xsl:value-of select="Vendor"/>
                                </Vendor>
                                <Description aid:table="cell" aid:crows="1" aid:ccols="1"
                                    aid:ccolwidth="167.39999999999998">
                                    <xsl:value-of select="Description"/>
                                </Description>
                                <Price aid:table="cell" aid:crows="1" aid:ccols="1"
                                    aid:ccolwidth="71.56323531584569">
                                    <xsl:value-of select="format-number(Price,'$D,DDD,DD0.00','money')"
                                    />
                                </Price>
                                <Photo aid:table="cell" aid:crows="1" aid:ccols="1"
                                    aid:ccolwidth="90.39880172119148"> Picture </Photo>
                            </xsl:for-each>
                        </TableSection>
                    </xsl:for-each>
                </Story>
            </Root>
        </xsl:template>
    </xsl:stylesheet>
    Last is the Oxygen xml file it makes that works in indesign, but cant get indesign to make on its own.
    Thanks for any help.

    <?xml version="1.0" encoding="US-ASCII"?>
    <Root xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl">
       <Story>
          <TableSection xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" aid:table="table" aid:tcols="6" aid:trows="4">
             <SectionCode aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="30.908648796453704">01</SectionCode>
             <SectionName aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="5">FRAME</SectionName>
             <Code aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="30.908648796453704">PD</Code>
             <ItemNum aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="100.42931416650917">IN054B</ItemNum>
             <Vendor aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="78.3">ALI ARC (AN)</Vendor>
             <Description aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="167.39999999999998">AliArc 92/9400 Bumper '97 &amp; Up</Description>
             <Price aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="71.56323531584569">$2,350.00</Price>
             <Photo aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="90.39880172119148"> Picture </Photo>
             <Code aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="30.908648796453704">PD</Code>
             <ItemNum aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="100.42931416650917">IN064F</ItemNum>
             <Vendor aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="78.3">ALI ARC (AN)</Vendor>
             <Description aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="167.39999999999998">AliArc 9900 Bumper</Description>
             <Price aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="71.56323531584569">$2,261.95</Price>
             <Photo aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="90.39880172119148"> Picture </Photo>
             <Code aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="30.908648796453704">PD</Code>
             <ItemNum aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="100.42931416650917">IN064T</ItemNum>
             <Vendor aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="78.3">ALI ARC (AN)</Vendor>
             <Description aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="167.39999999999998">AliArc 9900 Bumper Texas</Description>
             <Price aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="71.56323531584569">$2,800.51</Price>
             <Photo aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="90.39880172119148"> Picture </Photo>
          </TableSection>
    ETC.........
    forgot to paste

  • [CS5][XSL] InDesign crashes on dynamic selection...

    If I have any code like:
    <xsl:variable name="selectStr"><xsl:text>/Some/Path/To/Nodes</xsl:text></xsl:variable>
    combined with either of these:
    <xsl:variable name="selectNodes" select="$selectStr" />
    <xsl:for-each select="$selectStr">
         <!-- Some XSL stuff -->
    </xsl:for-each>
    results in InDesign crashing. The selectStr can be anything. I have tried many things.
    The only thing I can think of is that it is not automatically parsing the string to a node-set.
    Others seem to be getting a "result must be a node-set" with other parsers (not InDesign).
    Also it crashes reguardless of having the <xsl:text> elements in the first variable.
    Anyone know of a way to do this without crashing?

    Thanks Peter, Since posting the first question I've realised my mistake of not installing properly in the first place!! very annoying... I'm going to try and uninstall and re install the whole suite I think. Does that sound like the right thing to do?
    Many Thanks

  • Workflow for exporting xml from Excel and importing into table in InDesign

    Hello,
    I have worked out how to get data from a .xlsx into a table in InDesign. However, the workflow is still a little clunky and I am looking for way to automate the process further. My current workflow is as follows (files can be download here: http://visual360.co.uk/xml.zip)
    xml is exported from .xlsx by mapping the schema (see what_I_get.xml)
    assign tags to table and individual cells in InDesign
    This is the clunky bit: edit the what_I_get.xml to:
    remove the indentation (this seems necessary as otherwise when I get to stage 4, all the imported text is also indented)
    add tag for table in InDesign (p10_table)
    add tags for individual cells (p10_c11 etc.)
    import the produced what_I_want.xml in the structure panel of InDesign.
    Can anyone point me in the direction of how to automate step 3 above?
    Thanks in advance,
    Nick

    Hi Mike,
    Thanks very much for the reply. I am not at all familiar with XSL/XSLT. I have given it a quick google and it seems like it could be quite a steep learning curve to master. Maybe if I explain the whole context here, it may allow you to point me in the direction of a tutorial that provides a step by step approach to achieve my final goal. Alternatively, you may be able to suggest a whole new workflow.
    I am in the process of updating this document: http://www.ncl.ac.uk/students/insessional/assets/documents/IS_Brochure_2014-15.pdf
    The tables on pages 10-21 contain lots and lots of repeated information. We want the layout to in this format so that each group of students has all the information relevant to them on a single double spread. However, the challenge of using this approach is that it is very high maintenance to ensure the duplicated information is kept in sync - even using a copy / paste approach.
    I was hoping to overcome this by using a single source of data (eg. a spreadsheet) which would then feed into the InDesign. This workflow seems to be overcomplicated by the apparent need to use xml as the "middle-man".
    Ideally, I would like to press the export button in Excel and get this information into the the correct cells in the tables on pages 10-21 without a significant amount of manual labour - after all, my reasons for investigating an automated approach in the first place was to avoid the manual entering of data ie. the scope for error...
    An alternative approach maybe to skip Excel altogether and just use .xml. However, I am not sure that this is possible as Indesign only seems to allow you to import each element once. Maybe you could correct me here...
    I am happy to invest a certain amount of time in developing this approach as once it is in place, it will save a huge of proof-reading time year after year, especially as inconsistencies still persist despite our best efforts to weed them out.
    If you could let me know your thoughts on this and maybe identify a tutorial that would help me, I would be extremely grateful.
    Thanks again!
    Nick

  • How do I export content from an InDesign file to a database?

    I have this project that I'm working on where I need to do the reverse thing of what people normally do it seems - I need to take content that's available in InDesign and export that to a database. From my research, I'm attempting to do this by tagging content in InDesign and doing an xml export. This seems to work well except the resulting content is cluttered up with some things which are automatically tagged (Tables and Cells) and more importantly the exported xml does not contain linebreaks. The former problem I can work around (I can just have the import script ignore table and cell tags) but the latter problem is a loss of information so there's no workaround. Any help is appreciated.

    Recover media from iPod
    See this post from forum regular Zevoneer for options on moving your iPod data back to your computer.
    tt2

  • Error: "... is not a table ..." XML not correctly interpreted after XSL-transformation. Table row quantity problem.

    Hey guys, this is one of my xml-elements:
    Jaspreet Sohi 12 18 Juliane Lenz 11 17 Sophie Charlotte Stender 10 15 Rosbeh Hamidzadeh Khayyat 12 17 Lion Stoldt 12 17 Mats Lucas Meincke 6 8 Bero Luke Vincent Ernst 6 8 Cedric Roth 6 8 Soner Cantay 6 8 The following XSL Transformation I use once for transforming all "m" tags and once in order to transform all "j" tags. Please imagine the CSL-code below to be duplicated exactly. Only the "jungs"-table-Tag is replaced by "mädchen" and all underscores _j are replace by _m. As well all "select="j[@..." parts are replaced by "select="m[@...". 1 2 3 The code is very easygoing I think and not difficult to understand. As I said, I use it twice - for both transformations. The very, extremely weird thing, my problem, is that one transformation works perfectly in InDesign and a table is created for all "kategorie"-tags (all is set within a for-each loop). But the second script does not work! I simply do not get this I can't understand it. I've tried more than anything. InDesign sais (in German, so translated based on assumption) "jungs is an invalid table element or is displayed in wrong order". The second strange thing is that I can replace my "aid:trows" attribute by any number, e.g. "10" and immediately the script works fine (as there are never more than 6 "j" tags in my XML so that never the table has more than 6 rows"). But it does not want to work correctly with the actual number, my variable "rows_j". These are my variables: They are all defined before the tables for m and j are created. So finally, why (the heck) is one table created and interpreted perfectly whereas the second - immediately following the first in the XSL.script as an EXACT copy of the first - results in an error? As i've already said, I've tried really everything. For example the script works also when one of the parts "" is randomly deleted from the script. Removing one of these parts directly makes the script working. Just one of my attempts to understand the thing but this has only shown that none of these parts "cell to end-for-each" includes an error. I'm really desperate and looking forward to being rescued by one of you geniuses :)

    Hah, No worries. The forum software is, well, different.
    What would be better, though, would be a sample ID file, any XSLT/XLT files you use, and a bit of data exactly as you have it (pre-transform state). ZIP it up, upload to say dropbox.com and feel free to send me a private message for the download link.
    Too many times there is something different between samples pasted into a post and the real thing that it is sometimes less useful time-wise. I'll keep it private, of course. Then we can communicate via PMs or email until we can (hopefully) arrive together at a solution, then post what that solution is in the forum to benefit others.
    Thank you, Mike

  • Importing xml with xslt in InDesign CS4

    Hello All,
    i need someone's help who's an expert at xml and xslt features of InDesign CS4.
    i work in publication, besides our magazines we produce yearbooks with lots of repetative information fields in them. we get the data in xml fromat which we flow in to InDesign. the xml files are very simple, here's an example:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <Root>
    <Story>
          <Country> Afganistan </Country>
    <Company_ID>
       <Company_Name> Kam Air </Company_Name>
       <Company_Code> 1 </Company_Code>
       <Address_text> 1205 Qalla Fatuha </Address_text>
       <Address_text> P.O.Box 456 </Address_text>
       <Address_text> Kabul </Address_text>
       <Address_text> 22004 </Address_text>
       <Address_text> Afganistan </Address_text>
       <Telephone_text> Telephone: +93 20 2200 108 </Telephone_text>
       <Fax_text> Fax: +93 20 2200 110 </Fax_text>
       <Email_text> E-mail: [email protected] </Email_text>
       <Website_text> Website: www.flykamair.com </Website_text>
       <Personel_text> Abdul Raquib, chief Executive <Personel_text>
       <Personelmail_text> ([email protected]) </Personelmail_text>
       <Job_code> A1 </Job_code>
    </Company_ID>
         <Country> Albania </Country>
    etc.
    </Story>
    </Root>
    the problem is we don't want <Company_Code> and <Job_code> elements displayed in the InDesign file.
    so we created an xslt file that shoud get rid of these two unwanted elements (obviously the xml file above was pointed to this xslt file)
    <?xml version="1.0" ?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:template match="/">
    <Root>
    <Story>
      <Country>
    <xsl:for-each select="Company_ID">
       <Company_ID>
          <xsl:value-of select="Company_Name"/>
          <xsl:value-of select="Address"/>
          <xsl:value-of select="Telephone_text"/>
          <xsl:values-of select="Fax_tex"/>
          <xsl:value-of select=Email_text"/>
          <xsl:value-of select="Website_text"/>
          <xsl:value-of select="Personel_text"/>
          <xsl:value-of select="Pesronelmail_text"/>
       </Company_ID>
      </xsl:for-each>
    </Story>
    </Root>
    </xsl:template>
    </xsl:stylesheet>
    but it doesn't work. could someone tell me what's wrong with the xslt file? or what would the correct xslt file look like?
    Thanks everyone!

    Here's the sort of thing I mean in more detail.
    First, the XML file:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <?xml-stylesheet type="text/xsl" href="transform2.xsl"?>
    <Root>
    <Country>
    <Country_name>Afganistan</Country_name>
    <Company_ID>
       <Company_Name> Kam Air </Company_Name>
       <Company_Code> 1 </Company_Code>
       <Address_text> 1205 Qalla Fatuha </Address_text>
       <Address_text> P.O.Box 456 </Address_text>
       <Address_text> Kabul </Address_text>
       <Address_text> 22004 </Address_text>
       <Address_text> Afganistan </Address_text>
       <Telephone_text> Telephone: +93 20 2200 108 </Telephone_text>
       <Fax_text> Fax: +93 20 2200 110 </Fax_text>
       <Email_text> E-mail: [email protected] </Email_text>
       <Website_text> Website: www.flykamair.com </Website_text>
       <Personel_text> Abdul Raquib, chief Executive </Personel_text>
       <Personelmail_text> ([email protected]) </Personelmail_text>
       <Job_code> A1 </Job_code>
    </Company_ID>
    <Company_ID>
       <Company_Name> Another Company </Company_Name>
       <Company_Code> 2 </Company_Code>
       <Address_text> Elswhere</Address_text>
       <Address_text> P.O.Box 123</Address_text>
       <Address_text>Another City</Address_text>
       <Address_text> 22005 </Address_text>
       <Address_text> Afganistan </Address_text>
       <Telephone_text> Telephone: +12345678 </Telephone_text>
       <Fax_text> Fax: +12345678 </Fax_text>
       <Email_text> E-mail: [email protected] </Email_text>
       <Website_text> Website: www.dfhdfh.com </Website_text>
       <Personel_text> dfhdfhdfhdfhdfh</Personel_text>
       <Personelmail_text>dfhdfhdfhdfh</Personelmail_text>
       <Job_code> A2 </Job_code>
    </Company_ID>
    </Country>
         <Country>
    <Country_name>Albania</Country_name>
    <Company_ID>
       <Company_Name> Number 3 </Company_Name>
       <Company_Code>3</Company_Code>
       <Address_text>Somewhere in Albania</Address_text>
       <Address_text>Freedonia Avenue</Address_text>
       <Address_text>Whatever the captial of Albania is called</Address_text>
       <Address_text> 88888</Address_text>
       <Address_text> Albania </Address_text>
       <Telephone_text> Telephone: + 666 666 666 666 </Telephone_text>
       <Fax_text> Fax: + 777 777 777 777</Fax_text>
       <Email_text> E-mail: [email protected] </Email_text>
       <Website_text> Website: www.albaniar.com </Website_text>
       <Personel_text>Ludwig Wittgenstein, chief Executive </Personel_text>
       <Personelmail_text> ([email protected]) </Personelmail_text>
       <Job_code> A1 </Job_code>
    </Company_ID>
    </Country>
    </Root>
    Note that I have renamed the XSL file "transform2.xsl". I have got rid of the "Story" tag, and I have nested the tags more appropriately, with a new tag "Country_name". Here's the XSL:
    <?xml version="1.0" ?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:template match="/">
    <Root>
    <xsl:for-each select="/Root/Country">
    <Country>
    <Country_name><xsl:value-of select="Country_name"/></Country_name>
    <xsl:for-each select="Company_ID">
    <Company_Name><xsl:value-of select="Company_Name"/></Company_Name>
    <Address_text><xsl:value-of select="Address_text"/></Address_text>
    <Telephone_text><xsl:value-of select="Telephone_text"/></Telephone_text>
    <Fax_text><xsl:value-of select="Fax_text"/></Fax_text>
    <Email_text><xsl:value-of select="Email_text"/></Email_text>
    <Website_text><xsl:value-of select="Website_text"/></Website_text>
    <Personel_text><xsl:value-of select="Personel_text"/></Personel_text>
    <Personelmail_text><xsl:value-of select="Personelmail_text"/></Personelmail_text>
    </xsl:for-each>
    </Country>
    </xsl:for-each>
    </Root>
    </xsl:template>
    </xsl:stylesheet>
    (That file should be saved as "transform2.xsl" to match the link on line 2 of the XML.)
    Hope that works -- Jeremy

  • Structure inDesign document and export as XML for use in the web

    Hello everyone,
    I just recently started using inDesign and I am fascinated by its possibilities! I use it for a project where a finished inDesign layout that is used for a printed publication is now supposed to be transformed for implementing it on a web site. My job is to export the inDesign document as an XML file. After massive reading the last weeks I'm quite familiar with the structuring and tagging in inDesign. Though there's some issues I do not understand. Your precious advice would be of highest meaning to me
    The programmer who will later use my XML output for the web-transformation needs the document structured in different levels like "Root > Chapter > Subchapter > Text passage / table". I already structured the document with tags like title, text passage, table, infobox,... but the structure is just linear, putting one item following to another.
    How can I structure the document with reoccuring tags that enable me to identify the exact position of an item in the document's structure? So that I can say for example "text passage X" is located in chapter 4, subchapter 1. This has to be done because the document is supposed to be updated later on. So maybe a chapter gets modified and has to be replaced, but this replacement is supposed to be displayed.
    I hope my problem becomes clear! That's my biggest issue for now. So for any help I'd be very thankful!

    Our print publications are created in InDesign CS5 for Mac then the text is exported to RTF files then sent to an outside company to be converted to our XML specifications for use by our website developers.  I would like to create a workflow in which our XML tags are included in the InDesign layouts and then export the XML from the layouts.
    Some more detail about what kind of formatting is necessary might be helpful.
    I know that IDML files contain the entire layout in XML format.  Is it a good idea to extract what we need from IDML, using the already-assigned tags?
    Well, if you want to export the whole document, it's the only reasonable approach.
    We use a workflow system such that each story is a seperate InCopy document, stored in ICML format (Basically a subset of IDML). Our web automation uses XSLT to convert each story into HTML for use on our web site; it also matches it up with external metadata so it knows what is a headline and what is not, etc.. It is not exactly hassle free, and every once in a while someone uses a new InDesign feature that breaks things (e.g., our XSLT has no support for paragraph numbering, so numbered paragraphs show up without their numbers).
    You could do the same thing with with IDML, you'd just have to pick out each story, but that's small potatoes compared to all the XSL work you're going to have to do.
    On the other hand, there may be better approaches if you're not going to export the whole document. For instance,  you could use scripting to export each story as an RTF file, and then you could convert the RTF files into HTML using other tools.

Maybe you are looking for