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

Symbol to Entity format

Participant ,
Jul 22, 2022 Jul 22, 2022

Copy link to clipboard

Copied

Dear Experts,

When i export the symbols from indesign to export XML (Indesign-->Export XML), all symbols showing symbol format like see below screen shot. But i need my actual entity code format. Is there any possibility available in one shot? or any script in this requirement? Please suggest friends:

 

symbol-output file - 22-07.png

 

Thanks

kanagakumar.k

TOPICS
Scripting

Views

333

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

Community Expert , Jul 25, 2022 Jul 25, 2022

You could apply us-ascii encoding in your XML and it should work. The problem that I find is InDesign does not have the possibilty to apply this encoding when exporting. Trying to apply it using XSLT during export also results in an error, so you will have to apply the XSLT further in your workflow. The sample xslt would be as follows

 

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" encoding="us-ascii" indent="no"/>
	<xsl:template match=
...

Votes

Translate

Translate
Participant ,
Jul 25, 2022 Jul 25, 2022

Copy link to clipboard

Copied

Dear Friends,

Is there any possible symbol to entity code convertion in script wise? Kindly advice.

Thanks

kanagakumar.k

 

 

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

Copy link to clipboard

Copied

You could apply us-ascii encoding in your XML and it should work. The problem that I find is InDesign does not have the possibilty to apply this encoding when exporting. Trying to apply it using XSLT during export also results in an error, so you will have to apply the XSLT further in your workflow. The sample xslt would be as follows

 

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" encoding="us-ascii" indent="no"/>
	<xsl:template match="/">
		<xsl:copy-of select="*" />
	</xsl:template>
</xsl:stylesheet>

 

-Manan

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
Participant ,
Jul 26, 2022 Jul 26, 2022

Copy link to clipboard

Copied

Thank you "Manan"

 

Your suggest coding convert successfully in ascii coding format. 

In this place i need some clarification, my input coding in unicode format, see below the definition for your reference:

-----------------

1. My xml input coding "Unicode format" ---- "&#x0393;" 

2. Indesign symbol ---- Î“ (code converted symbol)

3. XSLT convert symbol in "acsii" coding format ---- "&#8225;"

-----------------

Can you advice, is there any possible for unicode format instead of ascii coding.

Because my requirement is unicode format conversion. Please advice.

 

Thanks

kanagakumar.k

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
Participant ,
Aug 01, 2022 Aug 01, 2022

Copy link to clipboard

Copied

Dear Experts,

I actual need is "unicode format" convertion, please see above the details. any one can you advice me.

 

Thanks

kanagakumar.k

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 ,
Aug 01, 2022 Aug 01, 2022

Copy link to clipboard

Copied

LATEST

Hi @kanagakumar,

In such a case I don't know any way of doing it using XSLT(I don't claim to it know too well though). The next option is then to iterate each node of the XML and parse/convert all the characters outside the ASCII range into the format you desire. Question for you, how are you getting these Unicode values in your input XML? The same technique could be reused after XML export out from InDesign.

-Manan

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