Export non-breaking hyphen to XML

Hi,
Using (still) Framemaker 8, Structured. I have documents that use the non-breaking hyphen. I would like to save these to XML, then use XSLT to translate the documents to a new form. When I encounter the non-breaking hyphen I would like to translate the non-break hyphen to a reagular hyphen.
What code(s) should I be looking for in the regular expression?
Thanks,
- m

Matt,
If you talk about regular expressions I assume you want to post-process the XML using XSLT 2.0?
Anyway, the non-breaking hyphen (entered as Esc - h) is a valid Unicode character and should appear in your XML as character ‑ – at least it does so using FrameMaker 9.
- Michael

Similar Messages

  • Forced return, non-breaking hyphens & spaces, suppress hyphenation + XML

    Forced return (linefeed), non-breaking hyphens and spaces, suppress hyphenation.
    None of these are preserved when exporting from FrameMaker to XML, since they do not seem to be represented by a Unicode code point. My question to you is: How do you deal with those things in XML?
    The last issues (non-breaking and suppress hyphen) have recently been brought up in:
    http://forums.adobe.com/thread/450363
    http://forums.adobe.com/thread/459503
    Forced return is a common thing in many FrameMaker documents to improve readability of certain phrases.
    For export of FM to XML, there have been proposals to use a special element with a prefix just to capture the special FrameMaker symbol. It works, and may be a valid useful path in certain cases, but I think that it is a questionable way of dealing with it for several reasons:
    It is only relevant for roundtrip, since these special elements will hardly be interpreted by other XML tools, which of course limits the value of XML export.
    It is unwieldy, to say the least, to require the user to insert special elements for saying simple things that otherwise are just natural key strokes in the regular text flow, and which are not perceived as structural elements of information. Most users would think of these symbols/charactes as control characters, and there is no validation warning that says you may not use these characters/symbols.
    An element is used for formatting purposes only, whereas all other elements are used for content or structure.
    There is no automatic way of transforming an existing text that has these "symbols" into some special element when a document is structured with a conversion table.
    There is no automatic way of transforming a structured FM document to XML such that these special "symbols" get translated to some suitable XML construct.
    If the last point could be solved, i.e if all those control characters or markers could automatically be translated to a suitable XML representation, then I would consider the whole issue as solved, otherwise not.
    Even without FrameMaker, how do people deal with these things in "pure xml". For instance, when XML is used for publishing (which I know Arnis Gubins is doing), there will guaranteed be a need to control both hyphenation and line breaks. So how do you (they) do that?
    How do other vendors cope with these issues, e.g XPP?

    Lynne,
    As anyone can see, entity declarations have not really been in the domain of my expertise (understatement), but I might just learn bits and pieces...
    Thanks! I have now done some more reading in various pdfs, such as scructapps etc, but also the w3c xml spec, all of which I have "read" before, but reading is not always the same as understanding...
    I now have used the "entity approach" to make both discretionary hyphen and suppress hyphen work, so that it is represented in the XML export and round-trips just fine.
    Forced return still puzzles me somewhat though: I have a working solution for that using the same entity approach, but it will not work for text ranges (although it is a bit odd to have forced returns in text range elements). Moreover, I am not certain that it really is the best way. In reading other posts on this issue, I have seen that some people want forced returns to really be linefeeds in the xml output, with no other linefeeds, and conversely, when importing xml that are "formatted" in lines, such as code, they want to preserve that.
    One  way to achieve that is to use:
         reader line break is forced return;
         writer line break is 1000 characters;  (or more characters)
    Then it is completely symmetric (i.e works also if some other app has generated the xml with intentional line breaks. And this method is global for all elements, and it works for me.
    Another way to achieve this is to use the following, but it is only valid inside an element:
         preserve line breaks;
         writer line break is 1000 characters;
    Then it is also completely symmetric (in the above sense), and it works for me.
    The latter method has the drawback that it only works for text in the element; it is not inherited to its children.
    But if we look at only one element, what is the difference between the two methods?
    As far as I have been able to see, the results are identical! Why two methods? The first one seems more powerful and general(?)
    Scrutinizing the documentation though, it says that 'preserve line breaks' will add an attribute 'xml:space', but I can't see that in my output?
    Also, concerning the documentation for line break, it says that FM would ignore line breaks when exporting, but it does NOT do that (fortunately). Forced returns always result in linefeeds, no matter what.
    I would be thankful if these issues could be explained, or elaborated.
    Also, would you recommend against any of these methods?
    With my preferred method of using the global 'reader line break is forced return' instead of a local (or many local) 'preserve line breaks', there is of course the danger that when importing xml, it is absolutely necessary that the xml really only has line breaks where they are intended, and not generated every 80 characters or so!
    Is there anything that says it is "ugly" or "bad style" to honor line breaks, and generate long lines?
    Finally, why do we need to limit the number of characters written in one line these days? Why 80, why 1000, why not an unlimited number of characters!?
    Will software these days really crash if given a very long line (assuming that it doesn't exceed total ram memory of course)?
    Sorry about so many questions, but I can't find any answers to them in the docs I have read and searched.

  • How to handle non-breaking hyphens on translation to XML

    Hi,
    I have a document that uses non-breaking hyphens in some places and hyphens in others. I think they were trying to stop line wraps from happening in certain cases.
    Anyway, now I need to save these files as XML. I believe I need a 'reader character map is 0x2D = 0x??;' statement in my ReadWrite Rules.
    Problem is I don't know what ESC - h equates to in hex so I can fill in 0x??
    Anyone know the hex value for the non-breaking hyphens?
    Thanks,
    - mike

    Mike,
    I do not know the answer to your question, but I handle nonbreaking spaces and nonbreaking hyphens with elements. That is, I define an empty element for each one in my EDD; the EDD inserts the appropriate character in FrameMaker. When exported to XML, these elements become simply empty elements but with names indicating their purposes. Import back into FrameMaker allows the EDD to insert the appropriate characters. Nothing needs to be done in the read/write rules. Of course, if the XML is to be processed by some other application, then the other application needs to convert these elements into spaces or hyphens for its use.
    This solution may not work in your situation.
    Van

  • Non-breaking hyphen not displayed correctly

    The non-breaking hyphen (\u2011, &#8209) is not displayed
    correctly - the wrong glyph is shown.
    To reproduce, do the following:
    1. Start the TLF demo editor
    http://labs.adobe.com/technologies/textlayout/demos/
    2. Import the markup below
    Results:
    - Line wrapping is correct: no line break at the hyphen
    - Times New Roman on Windows does have the glyph defined - it
    should look like an ordinary hyphen.
    This was seen in Build 3291.
    Cheers
    David
    Markup:
    <?xml version="1.0" encoding="utf-8"?>
    <flow:TextFlow whiteSpaceCollapse="preserve" xmlns:flow="
    http://ns.adobe.com/textLayout/2008"><flow:p
    marginRight="5"><flow:span fontSize="60">
    2011 non-breaking hyphen Macro‑media
    </flow:span></flow:p></flow:TextFlow>

    Hi Chris,
    you're right, Times New Roman does not contain the glyph. I
    was seeing 2013 whlie I type 2011 -- my mistake, sorry.
    However, it's a pity non of the OTFs implement this glyph
    (also Myriad Pro doesn't, for instance). Open Office 3 seems to
    replace it by a hypen (which is greyed), and InDesign CS4 also
    seems to replace the character and does no word-wrap at this
    position.
    Of course it would be very convenient if Flash could handle
    it the same way..
    Btw, character map is the same as my "chart table
    application", at least it's my translation from the German
    "Zeichentabelle". :-)
    So, sorry again for the confusion...
    david

  • Non-breaking hyphens

    Non-breaking hyphens in WebHelp do not work (the hyphenated
    work breaks at the end of the line) when the help system is
    displayed in Internet Explorer, although they work fine (keeps the
    hypenated word together) when displayed in another browser such as
    Mozilla Firefox. Is this a known issue with IE?
    The code that RoboHELP inserts for a non-breaking hyphen is
    <symbol name="Nonbreaking
    Hyphen"><!--begin!kadov{{-->&#45;<!--}}end!kadov-->.
    Thanks for any clues you can provide.

    pamz109 -
    Welcome to the forum. The built-in RHtml editor is known to
    take these kinds of liberties with your code, and you really do
    need to see a "&#8209" in there, or perhaps, just the html
    entity itself. This is where you might consider using DreamWeaver
    as your default editor. It won't change your code like the native
    editor (or FrontPage, for that matter) does.
    The alternative is to use a search-n-replace tool (like
    ReplaceEm) to process the
    files after generation.

  • Non-Breaking Hyphen in MIF String ?

    I'm using a spreadsheet (LibreOffice Calc) to generate the MIF for a Framemaker table: Paste in lines of tab-separated part_numbers and descriptors, copy out raw MIF that opens in Frame as a 3-column table with callout#, part_number and descriptor, each having a unique Xref Marker with marker text based on the p/n & descriptor. It works (including escaping any Frame-special chars in the descriptors), except for one extra feature I'd like to have.
    I'd like to make all dashes in the part-numbers into non-breaking hyphens (\x15). Using the Calc function SUBSTITUTE, I can change any character to any arbitrary string. Part numbers may have zero or more dashes.
    So for raw string 123-456A, where "-" is an NBH, I'd generate:
    <ParaLine <String `123-456A'>
    According to the MIF(7) reference, either of these MIFs should work:
    <ParaLine <String `123\x15456A'>
    <ParaLine <String `123<Char HardHyphen>456A'>
    They don't.
    They both throw a parsing error on open in Frame.
    This doesn't work either:
    <ParaLine <String `123\\x15456A'>
    It ends up as a literal \x15 in the final table.
    This Calc function doesn't work either (where decimal 21 is hex 15):
    =SUBSTITUTE($RawData.A3;"-";"CHAR(21)")
    The character doesn't survive copy and paste through a plaintext editor, even if a raw 0x15 is valid MIF (which it may not be).
    This is FM7.1 Unix, so I can't use the Unicode code point for an NBH (this is the suggest route for MIF8 or later).
    The following MIF is valid, but may require more parsing of my strings than I care to invest in:
    <String `123'><Char HardHyphen><String `456A'>
    I could use:
    =SUBSTITUTE($RawData.A3;"-";"'><Char HardHyphen><String `")
    If I were sure that no partnumbers began or ended with a dash.
    Any other ideas?

    <String `123\x15456A'> parse fail
    <String `123 \x15 456A'> nbh, but leading space (fail)
    <String `123\x15 456A'> nbh, no spaces, works perfectly, thank you
    Amusingly, if you re-save the same document as MIF, Frame(7) re-codes the nbh as:
    <String `123'>
    <Char HardHyphen>
    <String `456A'>
    ... as does MIF9, saving as MIF9,
    even though the MIF9 reference says that as of MIF8, HardHyphen and 9 of its pals are no longer represented by name - use the UTF-8 code points. I'm guessing that intended policy change had some unintended results.

  • Automatic Non-Breaking Hyphen

    Hi,
    Is there a way to make InDesign CS5.5 to automatically use a non-breaking hyphen when I paste a bunch of text with regular hyphens in it?
    Or, is there a way to tell it to treat a regular hyphen in the middle of the word as if it were a letter; that is not to break up a word with a hyphen in it when Hyphenation is turned off?
    Thanks.

    Manually: Use Alt+Command+Hyphen to manually insert a non-breaking hyphen (... I use it all the time on Windows but can't recall the Win key combo! ).
    On a text selection: Use Find/Change on your selected text to change all hyphens to non-breaking hyphens. See the Change Text dropdown menu for the code for a non-breaking hyphen.
    Alternatively:
    Add a GREP style to the paragraph style(s) you are using for your text that applies a character style specifying "No Break" on the regular hyphen, which is simply this single character
    in the To Text field of the GREP Style list.

  • Are there non-breaking hyphens in Pages '09?

    In some programs, like Adobe InDesign, you can do a find and replace for "regular" hyphens and replace them with non-breaking hyphens. Is this an option in Pages? I don't see anything like that described in the Help file.
    Thanks,
    Richard

    as I insert the character it seems to alter line interspacing from the previous line.
    That may indicate that the font you are using does not contain 2011, so another font with different vertical metrics gets used instead. You can see which fonts contain this character by selecting it in Character Viewer and looking in the Font Variation pane there.

  • Hiding a non-breaking hyphen

    I'm updating an edit from 2009 and cannot fathom how I managed to make a hyphen not show.  d-oh!
    I have applied a modified text animation "fly out by words" preset to a string of words.  These fly towards camera in apparent 3D.  Hyphenated words will stay grouped.  Those not hyphenated will animate independently. 
    In 2009 I found a way of concealing the hyphen so the joined words appear unhyphenated.  AE will not permit me to select no fill to both outline and fill, and I cannot adjust transparency to a single character. 
    Help!  I cannot recall how I did this 5 yeas ago.
    I would also like to add a depth of field effect to the camera so that the text flies into focus.  The issue is that this is a 2D effect creating the allusion of 3D - so the text reminds in one plane.  Any bright ideas of how to fake DoF would be welcome.
    Thanks in advance.

    To enable Depth of Field you need to add a camera. You don't have to animate it, just add it. There's nothing to it.
    If you want to fake it you can add an expression to the blur radius of something like Camera Lens Blur. If your expression divides the Z position of the layer by some factor then the farther away the layer is from Z = 0, the  more blurry it gets. Throw in an if statement to fix the problem that happens when you get negative numbers and you've got something like this:
    z = position[2];
    iris = 4;
    if (z >= 0)  {
         b = z/iris}
    else
    b = z/iris * -1
    z is the position of the layer in Z
    iris is something like the aperture of the lens. 4 seems to give some nice results when the layer moves about 500 pixels in Z. Iris works like the aperture on a camera 4 gives a shallow depth of field 16 gives a deeper depth of field just like a camera lens.
    The if statement says if Z is greater than or equal to zero then divide the z value by the iris value, but if the z value is not greater than or equal to zero, in other words, divide the z position by the iris value and then multiply that number by negative one to turn it to a positive value.
    EZ PZ. You could class up this expression by adding an Expression Control Slider and making iris = effect("iris")("Slider");
    If you use a slider you will have to be careful to not set the slider to zero or animate the value to zero of you'll get a divide by zero error. You could also fix that by modifying the expression with an if statement.
    Here's an animation preset from my collection:  fakeDOF.ffx

  • Using non-breaking spaces in attributes

    Hello all,
    I am writing reusable modules in Structured FrameMaker. Part of the reusability comes from using a variable instead of a hard-coded machine name, so that the machine name does not require variants of the same text. Using the standard FrameMaker variables is out of the question, so I have introduced a BookVar element that takes an attribute to determine which value is selected. All possible attribute values for the BookVar element lead to an attribute of the Book, which is the highest element in my publishable document.
    The problem is, that the name of the machine may contain a non-breaking space. I can enter the non-breaking space as the attribute value in the Book element, but when the BookVar that receives its value from the Book attribute is resolved the name does not contain the non-breaking space anymore. Is there a special character code that I can include in the value of an attribute ?
    Thanks in advance for your solutions
    Jang

    Hello again Michael,
    I tried the \x05 and it works like a breeze ! Thanks again.
    Apparently I was mistaken in assuming that I can suppress hyphenation via Text Range formatting, at least not if I want to keep my EDD free of any direct formatting. I can assign a character format, but in the Character Designer there seems to be no option to suppress hyphenation. This is handled on the paragraph level, and I do not want to suppress hyphenation for the entire paragraph just to keep my machine name from being cut down the middle.
    As I am not using roundtripping to XML for this client, the trick with the \x05 in the attribute value, combined with the Alt-0160 for the non-breaking space, does exactly what I need it to do. If I need to get into roundtripping later, I will have to find some kind of trick to preserve the suppressed hyphenation - probably by introducing an extra attribute in the BookVar element that controls it (and then gets translated into the correct preceding \x05 code by the Read-Write rules).
    Anyway, I already owed you a free dinner in Amsterdam, so now the drinks will be on me, too ! 
    Ciao
    Jang

  • How to insert a non-breaking space in a reference page?

    Hello all,
    Is it possible to insert a non-breaking space in a reference page? I want to control the TOC numbering so that page numbers don't break at the hyphen:
    In my reference page, I have the following TOC definition:
    <$paratext> <$chapnum>-<$pagenum>
    Replacing the hyphen with \+ doesn't seem to work.
    Thanks!
    Sue

    Sue,
    The sequence \+ is used in dialog boxes. Try typing the nonbreaking hyphen as
    Esc hyphen h
    Press the keys in sequence. Do not hold the Esc key down while you type the others.
    A nonbreaking space is
    Esc space h
    OR
    Control+space
    Hope this helps,
    Van

  • Non-Breaking Spaces in Structured FM9 Make a File Invalid

    Hi All,
    I'm working with Structured FrameMaker to author XML and I'm facing a problem that I've never had with FM 7.2: if I have a non-breaking space in a variable definition, when FM saves the file, it replaces the non-breaking space with the character code 0x11. I get the error message that states the file contains invalid characters. Worst of all, I can't reopen this file any longer with FM...
    Is there any solution or workaround? For me it's a crucial issue as it just doesn't allow me to continue using FM for XML.
    I'll appreciate any advice. Many thanks in advance,
    Alex

    Hi Michael,
    Thank you for answering. I installed the patch you mentioned, but it doesn't seem to work. The problem I describe still persist.
    Is there a way to make it work? It's very critical to us as this doesn't allow us to keep using FrameMaker...
    Thanks in advance,
    Alex

  • Remove non breaking space in cells

    Hi everyone,
    is there a way to remove the non breaking space tag "&nbsp" from the cells when the table is exported to excel?
    regards,
    Dionisios

    When the report is exported to excel, all the empty cells have the value " ". This is an HTML specific code that implies a non breaking space. This however creates a problem sometimes when users try to summarize columns or rows. I just wanted to know if there's a way of avoiding to get this HTML specific code in the export xls.
    regards,
    Dionisios

  • Non-breaking space in Adobe Muse

    Is it possible to insert non-breaking space in Adobe Muse?

    Hi,
    There is no direct way or Muse-specific keyboard shortcut to insert a non-breaking space.
    On Mac, I was able to insert it using Unicode Hex Input keyboard layout (see http://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input). Non-breaking space is 00A0. I would expect the corresponding Windows method to work too.
    That said, Muse exports a setting (word-wrap: break-word) that allows word breaks at normally 'unbreakable' positions. I haven't tested it, but I have a feeling non-breaking spaces will be defeated by this setting. May I ask what your use case is?
    Thanks,
    Abhishek

  • Why won't InDesign break hyphenated words at the hyphen?

    Why does InDesign not break hyphenated words at the hyphen?
    For example: "empty-handed".
    InDesign will break either "empty" or "handed" on either side of the hyphen. But not right at the hyphen, even if "empty" and "handed" are each set to No Break.
    Anyone know why?
    The hypen is typed in normally using the hyphen key on the keyboard.
    If I type a space after the hyphen, InDesign will break there, of course: "empty- handed"
    InDesign will break at an en-space: "empty–handed".
    But I prefer not to have to type a space or insert an en-space or other characters because I also need to export text to ePUB and want only the actual text.
    Correct break (if needed) at end of a line should be:
    . . . empty-
    handed . . .

    There is no reason why InDesign should avoid breaking hyphenated words at the hyphen. That's the preferred break location.
    This must be a bug.
    Evidence:
    When I turn Hyphenation OFF for a paragraph that contains a hyphenated word (such as my example, "empty-handed"), the hyphenated word is correctly broken at the hyphen (if needed at the end of a line). But when I turn hyphenation back ON, the word will not break at the hyphen.
    See the two screenshots below.
    1) Hyphenation is ON. "Empty-handed" is unbrokenat start of Line 3, yet line 2 is very loose, with room to fit "Empty-":
    2) Hyphenation is OFF. "Empty-handed" is broken at the end of line two, at the hyphen (resulting in better word spacing).
    By the way, the other settings in this Hyphenation dialog don't affect this issue. I tried changing them all, with no different result relating to the break at the hyphen.

Maybe you are looking for

  • I dropped my iPhone 5S in the toilet and now the screen is not fully responding

    So last monday i accidentally dropped my iPhone 5S on the toilet. I immediately dried it off and tried the rice trick. I left it there for 6 days til today it finally turned on. To my surprise, when it turned on i tried entering the lockscreen code b

  • Windows 8 op system. Cannot open premier pro cs6, at all.

    It says its fully downloaded, and up to date, but it does not work at all. When I hover the cursor over the name, or icon, it does not even register that its there. Right click does nothing. I cannot figure out how to open it up. Tried uninstalling,

  • Itunes cant communicate with Ipod

    I bought a new computer, a Toshiba A505 with Windows 7 and downloaded the 64 bit version of Itunes 9.0.3, when I open Itunes, I get a message box that says "the software required to communicate with the Ipod is not installed correctly. Please reinsta

  • Tax conditions requiremnt with Pricing?

    hi all Basic Price : At present taxes are calculated on Basic price. We need like this .. Pricing Step 1 :we want to calculate Taxes on the Total of 'Basic price + freight amount - Special discount " = Rs XYZ value. Now on Rs XYZ , the entry tax has

  • Duplicate layer appearance between documents

    Hi there, I use a javascript that copies all objects within a layer to a new layer in a new document. This works fine as all appearances are attached to the objects but appearances applied to a layer will not be duplicated (as the objects are copied