Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Exported XML contains minus signs where frames are anchored

New Here ,
Aug 22, 2011 Aug 22, 2011

Dear all,

In FM 10, when exporting XML, minus signs (U+002D) appear in text content at the location where (it seems) frames are anchored. What might be causing this? Is there a way to prevent this happening?

- Alex.


TOPICS
Structured
748
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 22, 2011 Aug 22, 2011

Alex,

What structured application are you using (what DTD/Schema are your documents using) and are there some read/write rules configured?

- Michael

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 23, 2011 Aug 23, 2011
Michael hi

It's a custom application based around the NLM (Journal Publishing) tag set. There *are* read/write rules but they only apply to table handling.

The export to XML is under control of an ExtendScript script, so I could potentially do something programatically as part of the export process, but would rather not have to ...

- Alex.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 26, 2011 Aug 26, 2011

On closer inspection I was mistaken - these are not anchors being exported as dashes but discretionary hyphens. Is there a way to prevent these being exported in the XML? I really don't need them ...

- Alex.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 26, 2011 Aug 26, 2011

Am 26.08.2011 um 10:13 schrieb alexbrn:

On closer inspection I was mistaken - these are not anchors being exported as dashes but discretionary hyphens. Is there a way to prevent these being exported in the XML? I really don't need them ...

Alex,

How are you looking at your XML file? I suspect that discretionary hyphens are exported not as dashes (\U002D) but as \U00AD. Some advanced editors can show you the hex code of a character. Whether it is necessary to remove them depends on what you plan to do with the XML file.

To remove a certain character from the XML you have to make sure it is exported as an entity and then define this entity as an empty string. It could work like this:

Add this line to the Read/Write rules file:

entity "softhyphen" is fm char "\x04";

Add this to the external DTD:

<!ENTITY softhyphen "">

For testing you could write <!ENTITY softhyphen "removed \x04">

- Michael

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 26, 2011 Aug 26, 2011
LATEST

Michael hi

Thanks for the helpful reply - yes I would have expected these to be something other than U+002D, but that is what Frame is exporting (I double checked with a hex editor to confirm). This is the case both for discretionary hyphens which have been rendered as soft hyphens, and the ones Frame records within moved content and that no longer falls at a line-end.

- Alex.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines