Back

If your email is not recognized and you believe it should be, please contact us.

  • Author
    Search Results
  • #64543
    Anonymous
    Inactive

    Hi,

    I'm working on a pricelist in XML, importing in InDesign, one of my challenges is this:

    When a price (or other field) has changed since the last printing, highlight the price in red.

    Is there a way I can use an xml attribute, or node, to tell InDesign to change a character style?

    Thanks,

    Bob

    Scott Croft
    Member

    I've stumbled across something which is confusing me, Im' sure there's a very simple explanation but I'm just not seeing it.

    For years I've used Quark and any time I wanted to create a shaped item I tended to base it on a simple rectangle and simpley add nodes as and where I needed them, then convert to corners or bezier curves to create the shape I wanted.

    I figured I'd be able to do the same in Indesign but when I create a rectangle frame and use the direct selection tool or the pen tool, i only seem to be able to add nodes or move nodes on the frame's text wrap box not the actual frame itself…

    I guess I'm missing something really simple because at the moment it seems like a very fiddly thing to do and I'm gradually finding that Indesign is pretty user-friendly throughout…

    Any help much appreciated.

    #62437

    In reply to: Tables link. Problem.

    Anonymous
    Inactive

    Hello,

    You need to pull the container box of your left-hand table down with the bottom node point so it gets longer, it will then pull back some of your content from the right hand page.

    Hope this helps

    R

    #61675

    The word “Here” shows blue on my iPad, and indeed it is an hyperlink. (It takes you here: https://kasyan.ho.com.ua/find_o…..text.html)

    (Related reading: Christopher Dean's plea on Typophile to “Please, stop using “click here when writing” — click on the name of this article to read :) )

    Has anyone noticed that the kerning pair trick for GREP Styles (described at link below) doesn't work in CS5/5.5? Or, has anyone gotten it to work? If so, how?

    https://typophile.com/node/69252

    #59651
    Anonymous
    Inactive

    Might be faster to learn about setting up and not breaking grids?

    https://typophile.com/node/47265

    #59427
    BenMajor
    Participant

    Actually, on second thoughts I think it might be easier if I use PHP to output the XML. This way, I don't need to use GREP styles in InDesign to determine which colour each row would be. For example, I could create an XML file which is structured as follows:

    <item>

    12345

    <description>My Item 1</description>
    <row1Col>red</row1Col>
    <row2Col>blue</row2Col>
    <row3Col>red</row3Col>
    </item>

    My question now is, can I use the value from the rowNCol nodes as the name of the stlye to be applied to each Table Cell?

    Thanks,
    Ben.

    suresh_ed
    Member

    I have an xml file tagged with namespaces:
    for example, ce:section, ce:para

    i just trying to collect the 'ce:floats' xml nodes by using the following code:

    //Defining the Namespace in the array of arrays of 2 strings
    Dim NmSpArr(,) As String = {{“sb”, “https://www.elsevier.com/xml/common/struct-bib/dtd&#8221;}, {“cl”, “https://xml.cengage-learning.com/cendoc-core&#8221;}, {“ce”, “https://www.elsevier.com/xml/common/dtd&#8221;}, {“aid”, “https://ns.adobe.com/AdobeInDesign/4.0/&#8221;}, {“aid5”, “https://ns.adobe.com/AdobeInDesign/5.0/&#8221;}, {“xmlns:xsi”, “https://www.w3.org/2001/XMLSchema-instance&#8221;}, {“xmlns:mml”, “https://www.w3.org/1998/Math/MathML&#8221;}, {“xmlns:xlink”, “https://www.w3.org/1999/xlink&#8221;}}

    //Trying to collect the 'ce:floats'
    Dim obj As InDesign.Objects = IndDoc.XMLElements(1).EvaluateXPathExpression(“//ce:floats”, NmSpArr)

    ID CS4
    Vb.net

    Above code always returning 0 as count. It seems there is problem with the xml namespaces definition.

    It is working for the xml which doesn't have namespaces. For example, book; author; price.

    When it comes to namespaces only it is not working. For example, ce:book; ce:author; ce:price

    Any help?

    #58278

    In reply to: Urgent help

    xmlapi
    Member

    My XML is valid….this is before I even import XML.

    When I duplicate the page spread…the tags inside the course node in the structure get moved to the first course node. The tags taht get moved are the ones in seperate placeholders.

    For an example, here is the structure

    <courses>
    <course><number/><name/><category/></course>
    <course><number/><name/><category/></course>
    </courses>

    Category is in a seperate placeholder. Number and name are in the main placeholder in the page.

    Now when I duplicate the page spread….here is what happens:

    <courses>
    <course><number/><name/><category/></category></category></course>
    <course><number/><name/><category/></course>
    <course><number/><name/></course>

    <course><number/><name/></course>
    </courses>

    See how the first course node has the category nodes from the duplicate courses???? This is before I import any XML.

    #58273
    xmlapi
    Member

    I have the following XML schema:

    <courses>
    <course><number/><name/><category/></course>
    </courses>

    My goal is to display the XML as pages in InDesign. This is fairly simple, no problem. The issue is that I need category to be on the side of the page as vertical text.

    I created two place holders. One for the side category, and one for the main placeholder which displays course number and name. I tagged my template and made sure the structure is correct.

    Now when I go to duplicate the page spread (so the other courses can be displayed as pages as well)….it moves the Category node in the structure to the FIRST course node. So if I duplicate the 1st page…the 2nd page's category node is moved into the 1st pages course node.

    Why is this happening?

    xmlapi
    Member

    I have an XML document consisting of the following:

    <root>
    <pages>
    <page>
    <title>test</title>
    </page>
    <page>
    <title>test2</title>
    </page>
    ….
    </pages>
    </root>

    I want to import this into a new Indesign document and have each page node printed in a new page in indesign. How do I do this? I tried creating a new document and importing the XML, which creates the tags and structure. However, when I drag and drop the pages tag from the Structure, it puts all of them on a single page?

    #57634

    It would require you to sort by the contact/department field in your spreadsheet, then move the department “one level up” around all of the contact groups with that same department field.

    I have no idea if that's even possible.

    Here is my idea instead :) Let InDesign's XSLT parser do the hard work. If you import your original XML and apply this XSLT on importing, it will create a “dep_group” around a list of contacts for that department. The first element inside the dep_group is your original “department”, and this line is removed from the actual contact information.

    XSLT:

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <xsl:stylesheet version=”1.0″ xmlns:xsl=”https://www.w3.org/1999/XSL/Transform”&#62;
    <xsl:output method=”xml” version=”1.0″ encoding=”UTF-8″ indent=”yes”/>

    <xsl:key name=”all_deps” match=”department” use=”.” />

    <xsl:template match=”/”>
    <xsl:element name=”contactlist”><xsl:apply-templates /></xsl:element>
    </xsl:template>

    <xsl:template match=”contactlist”>
    <xsl:for-each select=”contact[department[generate-id() = generate-id(key('all_deps', .)[1])]]”>
    <xsl:variable name=”cur_dep” select=”department” />
    <xsl:element name=”dep_group”>
    <xsl:element name=”department”><xsl:value-of select=”department” /></xsl:element>
    <xsl:apply-templates select=”../contact[department=$cur_dep]” />
    </xsl:element>
    </xsl:for-each>
    </xsl:template>

    <xsl:template match=”department”></xsl:template>

    <xsl:template match=”@*|node()”>
    <xsl:copy>
    <xsl:apply-templates select=”@*|node()” />
    </xsl:copy>
    </xsl:template>

    </xsl:stylesheet>

    (Warning: It seems some of the straight quotes are translated into 'curly' ones. Sorry 'bout that –you'll gonna have to weed them out one by one…)

    #57190

    I am fairly new to InDesign’s XML so take what I say with a large pinch of salt.

    Moving the placement of text frames in the layout will not shift the content in the xml structure. However juggling the some elements within the XML structure using the Structure View will change the order of the XML and MAY affect the placement of content.

    This is because InDesign tags not only content but also the objects that contain content, these have special meaning for InDesign. If you look at the XML in the Struture Pane you will see different icons for different 'types' of XML elements. Text frames or threaded text frames (which are treated as one XML element) by default are usually called 'story'.

    My experience is that you can shift elements around in the XML structure without moving things in the layout — as long as you avoid moving things at the text element level eg. elements that contain sentences or words. If these are moved elements will change relationship in the page layout.

    As an example. You have a 4 page spread in a magazine layout. The main content is in a threaded set of frames. The pages also contain photographs and captions which were imported much later in the design process. At the end of the editing process, you map paragraph and text styles and tag your photographs.

    Everywhere text is autotagged the text frame/s will also be tagged with an InDesign XML story element. Wherever there is tagged text it will be enclosed within the story xml element, which you can rename, but it remains a story element. The large threaded story will show up contained within one long story element, your captions which are tagged will show up in different parts of the xml structure in story elements and the photograph details will be in photo or image elements.

    You can now manipulate the XML, create a new element and pull all of the tagged elements of 4 page spread into this new element and order the story and other element to the way you want them to appear in the XML output, even placing elements such as images and other 'story' elements within the flow of enclosing story elements all without changing the appearance of the layout. As long as you do not move text elements around, the appearance of the page layout will not change but exported XML will have the same structure you see in the structure pane.

    This is my experience, big caevat, I have not had any experience with XML tables in InDesign.

    Essentially you manage two separate documents, one is the page layout, the other XML layout. You cannot juggle the page layout to affect the XML structure, you can, within restrictions, juggle the XML around without affecting the page layout.

    #57181
    Anonymous
    Inactive

    Thank you,

    I want the node order of the xml reflect the text frame order of the document, top to bottom, left to right as you say.

    I thought about a script that cut and paste in place each text box, starting from top left to restore the order of creation. Then i can redo the tagging and the nodes will respect the order of layout position…but I have little knowledge of scripting.

    Any ideas?

    #57164

    Marco

    Not sure whether you are trying to make the text frames reflect the node order of the xml or the node order of the xml to reflect the text frame order of the document. Are you wanting the xml to cascade in the order of the text frames on a page top to bottom? It might help to describe what you are trying to do.

    Is there a way to reposition text frames to match the order of structure pane nodes with the order of text frames on the page?

Viewing 15 results - 16 through 30 (of 31 total)
Forum Ads