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

HTML/XML escaped characters

New Here ,
Jul 18, 2017 Jul 18, 2017

Copy link to clipboard

Copied

Is there a known way for Frame to handle HTML/XML character references ('>' and that sort of escape sequence)?

TOPICS
Structured

Views

1.1K

Translate

Translate

Report

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

correct answers 1 Correct answer

Advisor , Jul 25, 2017 Jul 25, 2017

Randy,

You referred to "character references" in the first message in this thread, but the examples you mention include:

          –

          &

          ߞ

Actually, only the last one is a character reference (the # is important). The first two are entity references. SGML and XML entity references can be used for a variety of purposes including special characters. Five entities for special characters are built into XML. They provide an easy method of entering data characters that would o

...

Votes

Translate

Translate
Community Expert ,
Jul 18, 2017 Jul 18, 2017

Copy link to clipboard

Copied

What version of FM?
What downstream converter (e.g. RH)?

Just W3C mark-up characters, or...
What script sets? (e.g. all Unicode above U+00FF)
What target markup specification?
Is it necessary that named Entities be generated, or will dec/hex numbered Entities suffice?

I work with XHTML 1.0 quite a bit, and the support for non-ASCII Entities there is appalling.
It does at least include >
FM is not my tool of choice for generating such content.

Votes

Translate

Translate

Report

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 ,
Jul 18, 2017 Jul 18, 2017

Copy link to clipboard

Copied

Bob, thanks.

I'm using FrameMaker 2017.
The character in question was '–'. This might not be standard XML, but all the other tools I have process it OK. (I could use Unicode, but that's less familiar/readable.) (P.S. Agreed about >!)
Frame simply coughs up an error and stops reading the file when it gets to the &-string (so downstream tools are irrelevant, at this point).

I also agree that Frame might not be the best tool in this context. It's what's convenient for the time being.

Votes

Translate

Translate

Report

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
Community Expert ,
Jul 20, 2017 Jul 20, 2017

Copy link to clipboard

Copied

Randy, are you opening structured documents into structured FrameMaker?

If so, you can configure your XML or SGML application to do whatever you like, including treating your entities in the manner you require.

Votes

Translate

Translate

Report

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 ,
Jul 20, 2017 Jul 20, 2017

Copy link to clipboard

Copied

Matt,

Thank you. I'm reading .dita files. For the most part, this works fine, but not for special characters other than the XML-standard &, >, and so on.

I just tried entering dashes using the Unicode form, ߞ, and Frame replaces these with question marks.

Any ideas?

–Randy

Votes

Translate

Translate

Report

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
Advisor ,
Jul 25, 2017 Jul 25, 2017

Copy link to clipboard

Copied

Randy,

You referred to "character references" in the first message in this thread, but the examples you mention include:

          –

          &

          ߞ

Actually, only the last one is a character reference (the # is important). The first two are entity references. SGML and XML entity references can be used for a variety of purposes including special characters. Five entities for special characters are built into XML. They provide an easy method of entering data characters that would otherwise be interpreted as markup. These pre-defined entities are amp, lt, gt, quot, and apos. References to any other entity can only be used in a document that includes a DTD and then the DTD must declare the entity. The first thing to check when an entity reference such as – fails is that the entity is declared in the DTD. Note that an entity used in a DTD an be declared in an external entity such as a separate file that itself declares other entities.

As far as ߞ, I suspect that the character reference you wanted is –. The number in the first one is the decimal number 2014. The x in the second one indicates a hexadecimal number. And Unicode hex 2014 is the Unicode number for an em dash. Thus, if you had used —, your document would have contained an em dash. You could also have entered the character number in decimal. — would produce the same result. Since you mentioned –, though, you may want an en dash instead of em dash. The Unicode character number for en dash is one less than that for em dash, so it can be entered with 𢀓 or –.

   --Lynne

Votes

Translate

Translate

Report

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 ,
Jul 25, 2017 Jul 25, 2017

Copy link to clipboard

Copied

LATEST

Lynne,

I can only say "doh!" regarding the 'x' character for hex.

You're right: I had forgotten to enter that. The fix works fine.

Many thanks,

–Randy

Votes

Translate

Translate

Report

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
Community Expert ,
Jul 24, 2017 Jul 24, 2017

Copy link to clipboard

Copied

If there are Unicode characters, are you using a Unicode font?

If so, it sounds like you need to configure your structured application to allow for those characters in the XML Entities.

Votes

Translate

Translate

Report

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 ,
Jul 24, 2017 Jul 24, 2017

Copy link to clipboard

Copied

Matt,

A valid question. I'm using Calibri, which does support Unicode AFAIK.

Maybe a little more Frame configuration is required, as you suggest. How would I do that? I tried a quick search of the Frame help, but found no answers.

Thank you again,

–Randy

Votes

Translate

Translate

Report

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
Community Expert ,
Jul 24, 2017 Jul 24, 2017

Copy link to clipboard

Copied

Check out http://www.techcommtools.com/updated-framemaker-12-structured-developer-guides/

for some info on setting up structured FrameMaker.  In Fm 2017, all the things you need are under the Structure menu, but you may need someone else to help you if you aren't used to editing the file at Structure>Application Definition>Edit Global Application Definitions.

Votes

Translate

Translate

Report

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 ,
Jul 25, 2017 Jul 25, 2017

Copy link to clipboard

Copied

Matt,

Thank you. I will investigate further.
(I have used Structured Frame in the past, but in that situation I didn't have to do the setup myself.)
–Randy

Votes

Translate

Translate

Report

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