Mapping XML tags to paragraph styles that contain nested styles

I am importing XML into InDesign (CS5.5) and the tag mapping to styles is working fine until I get to a paragraph style that contains a nested style.
I have a sentence that starts with a number:
1the dog runs fast.
In InDesing properly styled looks like this:
     1  The dog runs fast.
(tab)1(tab)The dog runs fast.
The number is styled with a character style (Number) and the whole sentence is styled with a paragraph style (Sentence). In order to get the tabs in between the number, I have a nested style within the paragraph style (Sentence). This triggers the tabs when it hits the character style (Number) like this:
Number up to 2 Tab Characters
In XML, it looks like this
<sentencetag><numbertag>1</numbertag>The dog runs fast.</sentencetag>
Sentencetag is mapped to Sentence paragrph style and Numbertag is mapped to Number character style, but the nested style for the tabs are not displaying. I just get this in IND.
1the dog runs fast.
Everything works beautifully until I hit the nested styles, which I do need to get to work somehow. Any help would be much appreciated.
Thanks in advance!

It sounds like your tab characters are actually disappearing from content in the XML. Jeff was responding to the fact that they need to be there, and you state that you originally had them in your document, but they are not showing up once imported through the XML.
The tabs may be disappearing in the XML document due to the "TAB" character in your text editor not being a tab, or at least not properly-formed XML TAB equivalent, OR because you are not "importing whitespace elements" when you import your XML.
Importing whitespace elements can wreak havoc on other things in your XML structure and styled layout within the Indesign document, so I would put the XML quivalent of TAB everywhere a tab should be in your XML, and make sure NOT to import whitespace (when importing XML using "Merge Content", select not to import whitespace items from the import options).
I believe the XML friendly character code for a TAB character is "&#9;" or "&#09;" but have not tested this. Don't include quotes when adding the character code, just the ampersand, semicolon, and everything in-between.
Also, sounds like your tags are mapping ok for you, so your XML should look something like:
<sentencetag>&#9;<numbertag>1</numbertag>&#9;The dog runs fast</sentencetag>.
It should't matter where you put the TAB character equivalent in relation to your nested tag.

Similar Messages

  • Script to map xml tags to para styles

    I am using the 'FindChangeByList.jsx' to format a series of text files.
    I realise that I can map tags to styles using the 'Tags" palette.
    But I wondered, if it is possible, if someone would be able to show me the syntax to include in my list (.txt file) to map xml tags to paragraph styles assigned in the list as it runs the script?
    Steve

    If you want through find and change here below is a function for apply tag on paragraph style
    var myDoc = app.activeDocument;
    addtags("A Head", "Head");
    addtags("Text", "P");
    function addtags(stylename, tag)
    if(myDoc.paragraphStyles.item(stylename) != null)
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences.findWhat = '.+';
    app.findGrepPreferences.appliedParagraphStyle = stylename;
    app.changeGrepPreferences.markupTag = tag;
    myDoc.changeGrep();
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    Shonky

  • GR is not posible in an inbound delivery that contains nested HU

    Hi!!!
    I need your halep!!!
    I have the next problem in a cross company process:.
    When the outbound delivery ( that contains nested HU), the good issue is posted, an inbound delivery is created (using a standard workfolw that is used to transfer the outbound delivery HUs in the inbound delivery).
    The problem is, that I can't to post good receipt for the inbound delivery that contains the nested HU (provided from the outbound delivery).
    The system show the next message error:
    "Post Goods Receipt" is not allowed (HU 362784)
    Message no. BS007
    Please, coulyou help me?
    Thanks a lot!
    Regards,
    Tati

    Hi jeoshep, even i have the verys similar issue i need your help .Is it possibel for you to share how you solved the issue?
    THANKS IN ADVANCE!

  • Map XML tag to an object style

    Hi everyone!
    I am not sure this is the correct place to post it, but i didn't find any "tagging" department of the forums.
    I do import some XML into ID document.
    Text nodes of my XML are imported properly, and i can map any tag of XML to one of the paragraph or table styles.
    But, when i import any images (or another ID documents) with <... href="..." />, how can i map that tag to an object style?
    ///////////// It would be very helpful for example when i'm going to set the stroke of 1pt to all of inline images of text frame.
    Please any feedback would be helpful.
    Alex.

    I will try to give an example, just to give a kick start ........... you need little bit of tweaking to meet your actual requirement:
    suppose you have an xml element "tag" having an attribute "@href" with object style name defined as  it's value. 
    <tag href="object_style_name">
    "object_style_name" is a object style and should exist in your document. To map the tag with the corresponding object style value you can use XMLRules in JS:
    //NOTE: NOT TESTED, BUT SHOULD WORK
    #include "glue code.jsx"
    main();
    function main(){
    if (app.documents.length != 0){
    var myDoc = app.activeDocument;
    var myRuleSet = new Array (
    new findObjAttribute("//*[@href]")
    with(myDoc){
    var elements = xmlElements;
    __processRuleSet(elements.item(0), myRuleSet);
    else{
    alert("You have no document open!");
    exit();
    function findObjAttribute(XPATH){
    this.name = "findObjAttribute";
    this.xpath = XPATH;
    this.apply = function(myElement, myRuleProcessor)
    //Just to check whether the collect element is selected
    var elmName=myElement.markupTag.name;
    var styleName=myElement.xmlAttributes.itemByName("href").value;
    with(myElement){
    try {
    applyObjectStyle(myDoc.objectStyles.item(styleName), true);
         } catch(e){};
    return true;
    HTH,
    Pankaj Chaturvedi

  • Attaching XML tags to paragraphs (CS2/VB)

    Hi everybody,
    I need to build an Indesign document from several Word documents, attach XML tags to those document parts and also to retain Word's paragraph styles.
    I use temporary textframes and copy & paste to put the Word stuff together into one large textframe. Works fine so far. Paragraph styles remain intact:
    InDesign.XMLElement xch = root.XMLElements.Add("XML_" + Convert.ToString(cnt), "");
    InDesign.InsertionPoint ip = (InDesign.InsertionPoint)txt.InsertionPoints.LastItem();
    ip.Select(InDesign.idSelectionOptions.idReplaceWith);
    id4.app.Paste();
    But as soon as I call Markup() to add the XML tag to this part of the document, all paragraph style information gets lost:
    ip.Markup(xch);
    This is most certainly some kind of RTFM error, but since there's no really detailed documentation for scripting (at least I couldn't find one yet - hints are welcome), I'm stuck.
    Thanks a lot.
    Hans

    Hi Hans,
    The InDesign CS2 Scripting Guide and Scripting Reference PDFs are on your InDesign CS2 installation CDs.
    Many things in scripting did not change between CS2 and CS3--and there are more XML examples in the CS3 version of the Guide (though you should note that CS2 does not have the XML rules feature at all). You can find the InDesign CS3 Scripting Guide: VBScript at:
    http://www.adobe.com/products/indesign/xml_scripting.html
    (you'll need to click the Scripting Resources tab to get to the relevant page)
    The Markup.vbs example script (a fragment is shown on page 119 of the Guide; you can find the full script in the associated Zip archive of scripts) shows you the general approach to marking up page items or text. The basic form is:
    Rem Where "myXMLElement" is a reference to an XML element
    Rem and "myText" is a reference to a text object...
    myXMLElement.markup myText
    Here's a more complete script (VBScript form):
    Rem MarkupText.vbs
    Rem An InDesign CS2/CS3 VBScript
    Rem
    main
    Function main()
    Rem Use "InDesign.Application.CS2" to target CS2
    Set myInDesign = CreateObject("InDesign.Application.CS3")
    mySetup myInDesign
    mySnippet myInDesign
    End Function
    Rem mySetup function creates an example document.
    Function mySetup(myInDesign)
    Set myDocument = myInDesign.Documents.Add
    Rem Create some paragraph styles.
    Set myBodyText = myDocument.ParagraphStyles.Add
    myBodyText.Name = "BodyText"
    Set myHeading = myDocument.ParagraphStyles.Add
    myHeading.Name = "Heading"
    myHeading.PointSize = 24
    Rem Add XML elements
    Set myRootXMLElement = myDocument.XMLElements.Item(1)
    Set myXMLTag = myDocument.XMLTags.Add("xml_element")
    Set myXMLElementA = myRootXMLElement.XMLElements.Add(myXMLTag)
    Rem Create a text frame
    Set myTextFrame = myDocument.Pages.Item(1).TextFrames.Add
    myTextFrame.GeometricBounds = myGetBounds(myDocument,myDocument.Pages.Item(1))
    myString = "This is the first paragraph in a text frame." & vbCr
    myString = myString & "This is the second paragraph in a text frame." & vbCr
      myString = myString & "This is the third paragraph in a text frame." & vbCr
      myString = myString & "This is the fourth paragraph in a text frame." & vbCr
    myTextFrame.Contents = myString
    Rem Use ApplyParagraphStyle in CS3.
    myTextFrame.Texts.Item(1).ApplyStyle myBodyText
    myTextFrame.Paragraphs.Item(1).ApplyStyle myHeading
    End Function
    Rem mySnippet shows how to use the XMLElement.Markup method.
    Function mySnippet(myInDesign)
    Set myDocument = myInDesign.Documents.Item(1)
    Rem Have to associate the Root XML element with the story
    Rem before associating child elements.
    myDocument.XMLElements.Item(1).Markup myDocument.Pages.Item(1).TextFrames.Item(1)
    Rem Now we can associate XML elements with individual paragraphs.
    Set myXMLElement = myDocument.XMLElements.Item(1).XMLElements.Item(1)
    Set myText = myDocument.Pages.Item(1).TextFrames.Item(1).Paragraphs.Item(1)
    myXMLElement.Markup myText
    End Function
    Rem Utility function for getting the bounds of the "live" area
    Rem (the area inside the page margins) of a page.
    Function myGetBounds(myDocument, myPage)
    myPageWidth = myDocument.DocumentPreferences.PageWidth
    myPageHeight = myDocument.DocumentPreferences.PageHeight
    Rem Page.Side is a CS3 property. In CS2, use:
    Rem If myPage.DocumentOffset Mod 2 = 0 Then
    If myPage.Side = idPageSideOptions.idLeftHand Then
      myX2 = myPage.MarginPreferences.Left
      myX1 = myPage.MarginPreferences.Right
    Else
      myX1 = myPage.MarginPreferences.Left
      myX2 = myPage.MarginPreferences.Right
    End If
    myY1 = myPage.MarginPreferences.Top
    myX2 = myPageWidth - myX2
    myY2 = myPageHeight - myPage.MarginPreferences.Bottom
    myGetBounds = Array(myY1, myX1, myY2, myX2)
    End Function
    As to style information getting lost--it probably has to do with your Tag to Style/Style to Tag mapping. The above script demonstrates that it is possible to mark up text without losing the style.
    You might also consider using tag to style or style to tag mapping after pasting the text from Word.
    Hope this helps!
    Thanks,
    Ole

  • Issue mapping XML tags with element id's

    I know how to map standard XML tags into a template, but how do you handle an XML document formatted like this?
    <?xml version="1.0" encoding="UTF-8" ?>
    - <claims>
    - <claim type="institutional">
    - <loop id="HEADER">
    - <seg id="BHT">
    <ele id="BHT01">0019</ele>
    <ele id="BHT02">00</ele>
    <ele id="BHT03">0000</ele>
    <ele id="BHT04">20090806</ele>
    <ele id="BHT05">104133</ele>
    <ele id="BHT06">CH</ele>
    </seg>
    - <seg id="REF">
    <ele id="REF01">87</ele>
    <ele id="REF02">004010X096A1</ele>
    </seg>
    - <loop id="1000A">
    - <seg id="NM1">
    <ele id="NM101">41</ele>
    <ele id="NM102">2</ele>
    <ele id="NM108">46</ele>
    </seg>
    - <seg id="PER">
    <ele id="PER01">IC</ele>
    </seg>
    </loop>

    its again standard way of mapping.
    use attribute and map it.
    what is the requirement ?
    little more info on how you get this xml, how do you want to make the output to be ? etc..

  • Inserting paragraph rules into a nested style.

    Is it possible to create a style which includes a paragraph rule which can be used in a nested style. Character styles do not seem to allow rules, and nested styles seem to use character styles only when they are being built.
    The nested style is removing the paragraph rule at the mo and im struggling to see how to make it work.
    Using InDesign 5.5

    OK.
    The example has been built in InDesign 5.5. We are building an excel data sheet which will be data merged. As i need it to all follow the same style I have given all the elements within the example a style. The blue rule can't be done as a character style so ive had to do it as a paragraph style. When i open up the nested styles pallette to set up how I want it to behave I cant include the paragraph rule. (indesign wont allow me) The rest is working fine as they are character styles.
    Basicly what im trying to do is reproduce the style in the example with an image on the left, Title in blue bar at the top and the part number, description and price.
    I figured a nested style would be the way forward but I cant get the blue bar (Paragraph Rule to display from the nested style)
    I should point out that I rarely need to use nested styles so im sort of bashing about a bit to figure it out.
    Thanks

  • Error when updating a multivalued property that contains nested types

    we cannnot update a CMS content that contains a multivalued property composed of nested types.
    our CMS content is made of a custom type "t4" and contains the following properties :
    - titre of type "String"
    - compose of type "t1" where t1 is a CMS type containing the property titre of type "String" and doc of type "Binary".
    we get the following stack trace when updating the "compose" property on the CMS document :
    com.bea.content.RepositoryRuntimeException: Error retrieving multivalued nested property via given beginning of indexedName: compose, please check for the complete and correct indexedName on the Property in question. at com.bea.content.Node.getProperty(Node.java:454) at com.bea.content.federated.internal.NodeManagerImpl.getStream(NodeManagerImpl.java:669) at com.bea.jsptools.content.node.properties.editor.BinaryEditor.getValues(BinaryEditor.java:134) at com.bea.jsptools.content.node.properties.editor.NestedPropertyEditor.getValues(NestedPropertyEditor.java:90) at com.bea.jsptools.content.node.properties.editor.NestedPropertyEditor.getValues(NestedPropertyEditor.java:90) at content.node.nodeSelected.properties.NodePropertiesController.saveProperty(NodePropertiesController.java:1018) at content.node.nodeSelected.properties.NodePropertiesController.saveProperties(NodePropertiesController.java:973) at content.node.nodeSelected.properties.NodePropertiesController.saveProperties(NodePropertiesController.java:768) at sun.reflect.GeneratedMethodAccessor524.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:854) at org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:793) at org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:463) at org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:290) at org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:338) at org.apache.beehive.netui.pageflow.internal.FlowControllerAction.execute(FlowControllerAction.java:51) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419) at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:96) at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor$ActionRunner.execute(PageFlowRequestProcessor.java:2025) at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction(ActionInterceptors.java:90) at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:2096) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:550) at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:838) at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:634) at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:156) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at org.apache.beehive.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:1177) at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.executeAction(ScopedContentCommonSupport.java:622) at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.processActionInternal(ScopedContentCommonSupport.java:140) at com.bea.portlet.adapter.scopedcontent.PageFlowStubImpl.processAction(PageFlowStubImpl.java:107) at com.bea.portlet.adapter.NetuiActionHandler.raiseScopedAction(NetuiActionHandler.java:99) at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:177) at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:165) at com.bea.netuix.servlets.controls.content.NetuiContent.handlePostbackData(NetuiContent.java:219) at com.bea.netuix.nf.ControlLifecycle$2.visit(ControlLifecycle.java:179) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:351) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361) at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:128) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:339) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:330) at com.bea.netuix.nf.Lifecycle.runInbound(Lifecycle.java:162) at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:137) at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:370) at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:229) at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:183) at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:240) at com.bea.netuix.servlets.manager.PortalServlet.service(PortalServlet.java:574) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:273) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at com.bea.jsptools.servlet.PagedResultServiceFilter.doFilter(PagedResultServiceFilter.java:82) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:292) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3191) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1979) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1886) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1317) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:181) Caused by: com.bea.content.RepositoryException: Error retrieving multivalued nested property via given beginning of indexedName: compose, please check for the complete and correct indexedName on the Property in question. at com.bea.content.internal.client.common.NestedHelper.getContainerIndex(NestedHelper.java:243) at com.bea.content.internal.client.common.NestedHelper.loopNested(NestedHelper.java:278) at com.bea.content.internal.client.common.NestedHelper.getNestedProperty(NestedHelper.java:162) at com.bea.content.internal.client.common.NestedHelper.getProperty(NestedHelper.java:102) at com.bea.content.internal.client.common.NestedHelper.getProperty(NestedHelper.java:126) at com.bea.content.Node.getProperty(Node.java:451) ... 98 more

    I was able to reproduce this issue in the beta also. The issue has since been fixed. For the time being, it looks like you can just clear (delete) that particular value and re-add it w/ the updated binary.

  • Rendering text that contains old-style HTML character entities, e.g. ü

    The large text-corpus I'm working with was produced before the days of widespread Unicode support, and it contains HTML character entities instead of unicode codepoints, e.g. &uuml; for ü [u-umlaut].
    I can iterate through every text column in the ArrayCollections that I'm using for dataProviders to the DataGrid, and replace these entities with their unicode counterparts before the provider is assigned to the grid. But is there already a mechanism in place in Flex to render character entities in the DataGrid? Is there a ready-made ItemRenderer that can do this?
    Thanks

    DrClap wrote:
    So your example looks like this?
    <someNode>der fuchs springt &#252;ber den stein</someNode>
    now I feel stupid :-) Yes, that's correct.
    And you're actually getting an EntityReference node in your Document? I find that rather strange, since the documentation for EntityReference says
    Note that character references and references to predefined entities are considered to be expanded by the HTML or XML processor so that characters are represented by their Unicode equivalent rather than by an entity reference.
    Exactly!
    Because what you have there is a character reference. Is there something else in the document, a DTD for example, which might be interfering with that?No, just an ordinary XML header:
    <?xml version="1.0" encoding="UTF-8"?> ...If it helps, I can also post the complete document I am receiving.

  • Mapping of XML tags with column

    My xml structure is :
    <PARAMS>
    <ROWSET>
    <ROW NUM="1">
    <SID>man123</SID>
    <PO>
    <PO>OBJ1</PO>
    <PI>
    <PI>PARENTOBJ1 INSTANCE</PI>
    </PI>
    </PO>
    </ROW>
    </params>
    My table structure is :
    CREATE TABLE TEMP(SID VARCHAR2(20),PO POBJECT_T)
    where Object types are:
    CREATE OR REPLACE TYPE PINSTANCE_T AS OBJECT (PI VARCHAR2(255),CO COBJECT_T);
    CREATE OR REPLACE TYPE POBJECT_T AS OBJECT (PO VARCHAR2(255),PI PINSTANCE_T);
    To store this XML directly into table i have to have Column with name "PO" (same as XML tag).I am using this same table to store other XML with same tags . With this limitation its difficult to do so.Is there any way to map XML tag to column with different name????
    Thanks

    Hi,
    thx for your Reply,
    seems to work basicly but i get now in the IDE warnings with:
    "Data binding will not be able to detect changes when using
    square bracket operator. For Array, please use
    ArrayCollection.getItemAt() instead. "
    And how can i access the next item something like this didnt
    work right
    try someniceid.lastResult["some-root"]["someother-root"]
    I had to use single quotes (') to get it to work.
    Any ideas?
    Kind regards,
    Marko

  • Can you edit an existing nested style in CS5.5?

    In a previous InDesign CS5.5 document, I created a paragraph style containing a nested style. The nested style applied a bold font to the first sentence only, with the rest of the paragraph appearing in a roman version of the same font.
    I'm creating a new document now and would like to use the same paragraph style/nested style combination, only with different fonts.
    Is there some way to edit an existing nested style, or do I have to create a new one for the new fonts?
    Thanks for your help.

    You can load the paragraph style in the new document and then change the font....
    In the new document , Go to Paragraph style panel flyout menu and then choose "load paragraph style"and then choose the file in which you have this nested paragraph style present.

  • Nested styles

    I'm using nested styles in one of my documents. Specifically, I'm creating a long schedule and putting the times in a different font than the meeting names. Works great visually, but I've noticed that the nested style isn't *actually* changing the character style. It picks up the attributes of the nested character style but still lists its Character Style as "None." Is there some way to tell it to indicate nested styles with the actual character name? It does reflect changes made to that character style; however, I had also intended to search on that character style, but that doesn't seem possible (unless I manually stylize all of them).
    Not a huge deal, but I was kind of annoyed by it.
    Phyllis

    That's the way it is.
    And here's a word of caution: Some people like to define styles by formatting the text first, then using the formatted text to pre-load the style definition dialog. There's a little check-box there in the dialog that says something like "apply to current selection" (defining a style doesn't automatically apply it).
    If you've highlighted text and restyled, then created a character style with the box checked, and added that character style to a nested style, the highlighted text will appear the same as any other paragraph with the nested style, except that the character style is really applied (and shows up) as an override in that single paragraph. Should you later decide to change the nested style definition to use a different character style in that position, the change WILL NOT BE reflected in that single paragraph, which can be a bit disconcerting.
    Peter

  • Bolding all type before en space without using nested styles

    I'm trying to have all the words before an en space in all paragraphs made boldface without using nested styles. The nested styles work great for print, but don't seem to do the trick for epubs, such as this project.
    For example:
    Car Ferrari GTO
    I tried doing a find/change for all the text formatted with the nested style, changing the nested style to no char. style + Bold. But for some reason the nested style stays attached, and if I delete the character style that is called for in the nested style, the text loses its bf.
    Thanks for any help!!

    Silly me -- that trick uses another sort of workaround.
    I meant to point you to Harbs' script ApplyNestedStyles: http://in-tools.com/indesign/scripts/freeware/ApplyNestedStyles.zip

  • Retain Nested Styles...

    Dear everyone,
    I have developed the script for creating such character styles and applying it to control many character formats like Italic, Bold, Bold Italic, Superscript, subscript etc.... And its working fine. In some of paragraphs the texts having nested styles. And it is fixed in the paragraph style. When i  run the script, the character style applied to this nested style applied text also. So I don't want to apply character styles if the texts are having nested styles.
    Now i am trying to find the nested styled contents, then the character style "None" is applied to those contents. Find the part of my script below and it is not completed.
    //=======================
    myDoc = app.activeDocument;
    try{
    app.findTextPreferences = app.changeTextPreferences = null;
    app.findTextPreferences.fontStyle = "Italic";
    app.findTextPreferences.position = Position.normal;
    myFind=myDoc.findText(false);
    for(i=myFind.length-1;i>=0;i--)
        if(myFind[i].contents.nestedStyles==null)
            myFind[i].appliedCharacterStyle="cs_Itl";
        else{
            myFind[i].appliedCharacterStyle=myDoc.allCharacterStyles[0];
    catch(r){alert(r);}
    alert ("Done");
    //======================
    Can anyone look into this and help me out. Also suggest me if there is any better way to do this.
    Thanks in advace
    Thiyagu

    Hi Harbs,
    Thanks for your timely support. I have checked its working fine but if the nested styles are not applied properly to the paragraphs then it might be a risk. As you mentioned that character styles are get removed.
    Thank you very much
    Thiyagu

  • Assign paragraph-styles to xml-tags correctly. How to?

    Hi,
    I want to assign xml-tags to existing paragraph styles in InDesign CS6 on a Mac 10.6.8. The xml itself is organized like this:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <katalog>
    <artikel id="32434">
    <img href="/bilder/32434.tiff" />
    <artikeltextgruppe>
    <artikelmarke>DieselGabana</artikelmarke>
    <artikelheadline>Jeans ist super</artikelheadline>
    <artikeltext>Superjeans knallt rein.</artikeltext><artikelnummer>70238</artikelnummer>
    <artikelmaterial>100% Jeans</artikelmaterial>
    <artikelgroesse>Uni</artikelgroesse>
    <artikelfarbe>Uni</artikelfarbe>
    </artikeltextgruppe>
    </artikel>
    </katalog>
    By selecting the option "Assign formats per name to the tags" (translated from German) I wanted to generate the desired look. But if I start this all I get is the whole textblock of <artikeltextgruppe> assigned to 1 formatstyle. And besides that the whole content of <artikeltextgruppe> looks like one single paragraph without any structure (no linebreaks) The content though is correctly structured because I can highlight the value of e.g. <artikelmarke>separately by doubleclicking this tag in the structure-view.
    a) What can I do to assign the formats correctly AND to have correct linebreaks?
    b) If I drag my node <img href="/bilder/32434.tiff" /> iin the layout I get a message displayed to search again for the correct reference location. And that happens independently on using relative or absolute references (Although I need to use relative ones) What can I do here?
    thanks so much

    First, I would probably do a search and replace to remove the group element using a text editor (the <artikeltextgruppe> and </artikeltextgruppe> elements). They really are not needed.
    Second, I usually create my styles with the same names as the elements themselves. Then, after the XML is imported, I use the "map tags to styles" command from the Structure pane.
    I copied and pasted the single artikel element to create 4 records, added a varition of an image to each element record. Once the paragraph styles were mapped, your XML looked like this in a two column format (to get all 4 records on a page)...
    By default, ID will create a single line to a single line in the XML. So if you desire elements to be on their own line, the XML needs to be formatted that way. If you need different styling within a paragraph, you need to create character styles and alter the elements within an XML group and or paragraph and add the code in the XML accordingly or post process once inside of ID.
    I always need to take the XML I am given and reformat, move elements with the tree, change links to images, remove tabs and or spaces where I do not want them, tag for character styles, etc., to get close to how I want the initial format to be.
    Mike

Maybe you are looking for