Assign paragraph styles to xml tags correctly. How?

Hello


I want to assign xml tags to paragraph styles in InDesign CS6 on a Mac 10.6.8. The XML itself is organized as follows:


<? XML version = "1.0" encoding = "UTF-8" standalone = "yes"? >

< catalog >

< article id '32434' = >

"< img href="/bilder/32434.tiff "/ >

< artikeltextgruppe >

< artikelmarke > DieselGabana < / artikelmarke >

< artikelheadline > super Jeans ist < / artikelheadline >

< artikeltext > Superjeans knallt kidney. < / artikeltext > < number > 70238 < / weight >

< artikelmaterial > 100% Jeans < / artikelmaterial >

< artikelgroesse > UK < / artikelgroesse >

< artikelfarbe > UK < / artikelfarbe >

< / artikeltextgruppe >

< / product >

< / katalog >


By selecting the option "Assign formats by name to the tags' (translated from the German), I wanted to create the desired look. But if I start all I get is the entire < artikeltextgruppe > textblock assigned to 1 formatstyle. And not to mention that the whole content of < artikeltextgruppe > resembles a single paragraph without any structure (no line breaks) the content is properly structured, because I can highlight the value of e.g. < artikelmarke > separately by doubleclicking the tag in the structure view.


(a) what can I do to assign formats correctly AND to have correct line breaks?

"(b) if I drag my node < img href="/bilder/32434.tiff "/ > iin the layout, I get a message posted to search again for the location of the correct reference. And this happens independently on the use of the relative or absolute references (even if I need to use those on) what can I do here?

Thank you very much

First of all, I have probably do a search and replace to remove the group element with a text editor ( and elements). They aren't really necessary.

Secondly, I usually create my styles with the same names as the items themselves. Then, after the XML is imported, I use the command "map tags to styles" in the Structure pane.

I copied and pasted the single article element to create 4 folders, added a change to an image for each record of the item. Once the paragraph styles have been mapped, your XML looked like this in form of two columns (to get all 4 records on a page)...

By default, ID creates a single line to a single line in the XML file. So if you want to be on their own line of the elements, the XML must be formatted like this. If you need a different style within a paragraph, you create character styles and edit the items in a group of XML and or paragraph and add the code in the XML file accordingly or post-processing once inside the code.

I still need to take the XML I gives me and reformat, moves with the tree items, change the links to the images, delete tabs and or spaces where I do not want, tag character styles, etc., to be closer to how I want the original format to be.

Mike

Tags: InDesign

Similar Questions

  • Why apply a paragraph style let substitutions sometimes? How to prevent this?

    Sometimes when I apply a paragraph of a text style he chooses replace some attributes, making me have click on the button "ignore substitutions" constantly. If I tell indesign to apply a paragraph style why it assumes that my intention was not to implement also the font weight or other random attributes? I can't seem to find the reason for it or how to prevent it, your time and cause errors of formatting if I missed something. Any ideas? No style of characters used in the document.

    Thank you!

    If you want to remove manual replacements you must hold down the ALT key when you apply the style.

    And for the local formatting, you must use character styles.

  • How to avoid overwriting the italics when you apply paragraph styles?

    First of all, let me say thank you to the community of Adobe's Forum for the great help over the years! You Rock! 9 times out of 10 you nail!

    OK, so I have a long document full of italics, bold and accents. Successfully, I imported the text in MS Word and kept these text features using the import options. But now, when I go to apply paragraph styles, the italics are lost. Is it possible to implement paragraph styles so that they maintain Roman, italic, bold and also special characters like accents? Thank you!

    Hi David: I just put upward (and record) queries for search/replace that I of course after you import all text. For example, I have one that is italic in the document and it goes to a character called italic style. Once I saved queries, it is very fast to run on all the stories at the same time. And once the local formatting is managed through character styles, it is intact by assigning paragraph styles.

    ~ Barb

  • Paragraph Photoshop styles does not update correctly

    Hello

    I have trouble getting the paragraph styles feature to work correctly in Photoshop CC 2015. I created a style of paragraph called 'p' and taking into account these values:

    Screen Shot 2015-06-30 at 2.46.59 pm.png

    Note that 18px is the size of the text.

    When I select a text element and change to this style of 'p' is not is not updated even though it says the paragraph style has so no substitutions. As you can see the text isn't 18px, although the paragraph on the right shows style now overrides

    Screen Shot 2015-06-30 at 2.47.51 pm.pngScreen Shot 2015-06-30 at 2.47.56 pm.png

    Please help me with this

    Switch to Photoshop for beginners

  • conditional display of XML tag

    Hello

    IAM using Oracle 11 g.

    While that generate XML based on the value of data I need different XML tag. How it is possible.
    but the value must be zero. but we the tag is different.

    For example
    If the column contains data such as'm ' and 'F'
    The tag must be < male > < / man > if data are'm ' of Male and
    < female > < / woman > if data are 'F' of the female. If there are data zero then the tag should not be display


    Is it possible then that the extraction of data from SQL and XML data conversion

    Concerning
    Oracle user

    Published by: user9080289 on December 15, 2011 21:58

    Published by: user9080289 on December 15, 2011 21:59

    something

    case when your_column = 'F' then xmlelement("Female", your_column )
         when your_column  = 'M' then xmlelement("Male", your_column )
    end
    
  • How can I find and replace the xml tags?

    Hi, I am using xml in my workflow and want to be able to remove some tags if they contained particular text.

    Here is an example of the xml struct...

    < Entry >

    < name > DEFAULT < / name >

    < such > default < / such >

    DEFAULT < address > < / address >

    < / Entry >

    I use this initial structure to define paragraph styles to follow when you import the xml data.

    This leaves DEFAULT in place everywhere where an entry is not any content of this field.

    I want to be able to import my XML and then run a script that deletes tags that include by DEFAULT, - I need to the xml tag to remove not only the text, if I do a normal find and replace will remove only the text not the tags that is causing problems with style. I also want to remove the end of para/return (^ p) that I placed at the end of the line. So it would be the same opening editor mode and removing content, tags + hard back in there, but I want to automate the process...

    So I think that's what I'm looking for in each case

    "< name > DEFAULT < / name > ^ p.

    and I want to replace it with nothing.

    Is this possible in a script (ideally javascript)?

    I have a little knowledge of javascript, but don't know how to search for and target this kind of string in indesign...

    using indesign cs5

    Thank you very much

    Hello

    Script should do it in two steps:

    1 find all occurrences of that is ' > by DEFAULT.<>

    2 delete the whole paragraph which is a found_text container.

    For example, in this way - JS - (a textFrame filled your text must be selected):

    var mStory = app.selection[0].parentStory;
    app.findTextPreferences =  null;
    app.findTextPreferences.findWhat = ">DEFAULT<";
    var myF = mStory.findText();
    var count = myF.length;
    while (count--)
         myF[count].paragraphs[0].remove();
    

    Rgds

  • Paragraph styles - how will I know they are working on my site... So they can inherit Business catalyst (blog)?

    I created my site in Muse and adding a business catalyst blog module.

    I created my paragraph styles and added code to the modulestylesheet.css.

    Why the blog is not read the typekit fonts?

    How can I know muse renders fonts correctly?

    Any thoughts would be appreciated,

    Darren

    Hi Darren,

    This article is a bit outdated in terms of the UI, but the main steps are the same. Typekit fonts must be added manually as Typekit requires you to add some JavaScript and CSS code.

    If you do not publish a version of the site, and I'd be happy to take a look. You can leave us a message of support to: [email protected].

    See you soon,.

    Benjamin

  • How Referance groups paragraph Style in the Code?

    How reference to a paragraph in style Group before a paragraph style in the code? My "Heading 1" paragraph style is in a group, called "headings".

    myStyle = app.activeDocument.paragraphStyles.item("Heading 1");
    myStyle.appliedFont = "Microsoft JhengHei";
    
    

    Region Capture.png

    Richard:

    I build a large number of files Indesign containing the tag text, and this is an example of what I am at the beginning of the line when the style is located in a group.  The style name is "AGBoldCtr" and it is located in the group "xSports."

    American League

    In the code, I create a variable for a style to a group like this:

    var PPHead = app.activeDocument.paragraphStyleGroups.item("xSports").paragraphStyles.item ("AGPPHead");

    Then, I attribute PPHead variable of a paragraph as in:

    app.activeDocument.selection [0] .paragraphs [iLoop] .appliedParagraphStyle = PPHead;      //

    Dick Conrad

  • [JS IDCS5] Create paragraph styles tags

    Hello

    I want to iterate al paragraph styles in a document to create the tags there. The tags should have the same name as the paragraph styles. Is this possible and how?

    Best regards, Sjoerd

    Hi Serjod,

    You can try the following JS code, I hope that you expect at this!

    var myDoc = app.activeDocument;
    var myPStyle = myDoc.paragraphStyles;
    //var myAllPStyle = myDoc.allParagraphStyles; if you want this enable a line all the folder paragraph styles also consider
    for (i=2; i
    

    THX

    csm_phil

  • How to insert an ellipsis in the paragraph style?

    Hi all

    In the paragraph style, how to insert the selection to the last paragraph symbol.

    Please someone help me solve this problem.

    I have attached the screenshot of the sample. Like that, I have to insert "selection" symbol (three points) in the indesign paragraph style options.

    ellipse.jpg

    Very simple to do this, follow these steps

    1. double click on the paragraph style if you created (if this isn't the case create a new paragraph style, see the image)

    2. in paragraph style options, choose paragraph nets and do all the settings, see the image

    Hope this will help you

    Thank you

  • (JS) How to apply the existing paragraph styles to text in a textFrame

    @I have a definition called "Header" in my Document.

    How to apply this paragraph style "Header" textFrame selected with the text "This is my head" using JS

    Please advise...

    Thank you..

    @I have a definition called "Header" in my Document.

    How to apply this paragraph style "Header" in textFrame selected with the text "This is my head" using JS

    as directed by your initial thread in question that asked you to change only the text block selected, so I gave code such as

    myDoc1 = app.selection [0];

    but myDoc1 = app.activeDocument; lets you apply the styleforwholedocument

    FYI

  • How to remove paragraph styles select only

    Hi friends,

    How to remove paragraph styles select only

    Example:

    CO_H3

    COCPN

    COINT1

    COINTT

    Line of credit

    Head of design issues

    Design A-Head Mtrs

    Design Mtrs Hd

    EOC-nl-listitem

    Literate EOU continued

    Thank you

    Hi Karthik,

    Please try this code

    indesign #target

    var allStyles = app.activeDocument.paragraphStyles;

    var total = allStyles.length;

    var arrPosition = 2;

    myInput ();

    myInput () function

    {

    var myParStylesList = app.activeDocument.paragraphStyles.everyItem () .name

    var w = new window ('dialogue', ' ParagraphStyles applied: ");

    var myInputGroup1 = w.add ("group");

    myInputGroup1.add ('statictext', undefined, ' paragraph style: ");

    myInputGroup1.alignment = 'left ';

    var myDropdown1 = myInputGroup1.add ('dropdownlist', undefined, myParStylesList);

    myDropdown1.selection = 1;

    var myButtonGroup = w.add ("group");

    myButtonGroup.alignment = 'right ';

    myButtonGroup.add ('button', undefined, 'OK');

    myButtonGroup.add ('button', undefined, 'Cancel');

    w.Show ();

    r = [myDropdown1.selection.text];

    for (i = 2; I have<>

    {

    If (allStyles [i] .name is r)

    {

    allStyles [i] .remove ();

    Return r;

    }

    on the other

    {

    arrPosition + 1

    }

    }

    }

    Kind regards

    Barry B.

  • Not applying paragraph styles does not correctly

    I don't know even how to describe this problem except that... weird.

    For example: I put a style particular to 21 PT 22 PT. leading. When I apply this style to a paragraph, it sets the text to 42/44 - twice as big. Even with a heading style. I updated PT. 41 and it comes out to pt 82. It does this for all my styles. The '+' is not appear on any of them, this isn't a matter of substitution.

    Has anyone else seen elsewhere? I'm getting nowhere attempting this nail.

    TIA

    The text has been transformed? This will mess up the paragraph styles. Do not apply to the size of the game. The paragraph style will be applied, but then the transformation will also be applied.

  • How can I include spaces in paragraph before and after in the paragraph styles?

    By specifying the paragraph spacing BEFORE or AFTER a paragraph which differs from the CONDUCT ranging from space, how can I include in my paragraph styles? I'm on a MAC under OS Mavericks.

    Yes, by selecting text/para use space before and after.

    Thank you

    Sanjit

  • I've updated all paragraph styles in my site, but the code is not generating of heading and paragraph tags.  Help!

    Try to increase the SEO on my site of Muse.  I didn't know I could implement paragraph styles when I first built the site.  Just went and built styles but the generated HTML map includes all the text in the img tags instead of the header/paragraph tags.  Help!

    For me it looks like you are using non-InDesign. If they are not web fonts or you've applied things like a shadow to him, then it will convert the text to a picture in which you can apply tags: for.

    Can you provide a link to the site as well as the mention of what you use the police?

Maybe you are looking for