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

xml files: Custom Declarations, Header Modifications

Explorer ,
Apr 03, 2019 Apr 03, 2019

Copy link to clipboard

Copied

Hi Folks,

I hope this is the correct forum...

I'm working with structured Framemaker2015 on xml files. The header of the files looks are as follows:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "technicalContent/dtd/concept.dtd" [

]>

<concept id = "id15AMAG00PY6"

    xmlns:ditaarch = "http://dita.oasis-open.org/architecture/2005/">

<title>...

Sometimes, for batch processing and special operations, I use powershell commands which fail due to a non-breaking space,   anywhere in the files.

A good solution seems to declare it in the header:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "technicalContent/dtd/concept.dtd" [

<!ENTITY nbsp "&#160;">

]>

<concept id = "id15AMAG00PY6"...

Is there a way to make Framemaker write this declaration when editing the files? Is this to be implemented in the read/write rules? Which documentation do you recommend?

Regards,

Fabian

TOPICS
Structured

Views

519

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 , Apr 03, 2019 Apr 03, 2019

Fabian,

  Yes, this is the correct forum. There is documentation on this issue in the Structure Application Developer's Guide.

  In general, a document type declaration has the form

  <!DOCTYPE root External-ID [Internal-Subset]>

where the External-ID identifies where the externally-stored portion of the DTD can be found and the Internal-Subset contains additional declarations. Both the Eternal-ID and the Internal-Subset are optional.

  When FrameMaker opens an XML document it stores the information

...

Votes

Translate

Translate
Advisor ,
Apr 03, 2019 Apr 03, 2019

Copy link to clipboard

Copied

Fabian,

  Yes, this is the correct forum. There is documentation on this issue in the Structure Application Developer's Guide.

  In general, a document type declaration has the form

  <!DOCTYPE root External-ID [Internal-Subset]>

where the External-ID identifies where the externally-stored portion of the DTD can be found and the Internal-Subset contains additional declarations. Both the Eternal-ID and the Internal-Subset are optional.

  When FrameMaker opens an XML document it stores the information included in any Internal-Subset in a flow tagged Entity Declarations on a reference page also tagged Entity Declarations so that it can regenerate the declarations when the resulting file is saved as XML. Thus, if you are starting with existing XML, you shouldn't have to do anything; when you save your file as XML, the necessary Internal-Subset should appear. If you are creating new documents from a template, make sure the template has an Entity Declarations reference page with the appropriate content. An easy way to create that reference page is to open an XML document that has the internal subset you want and then import reference pages from that document into the template.

       --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
Explorer ,
Apr 04, 2019 Apr 04, 2019

Copy link to clipboard

Copied

LATEST

Simpler than I've hoped! Adding an Entity Declarations table in my templates did the job.

Typing &#160; did produce XML Parser Messages: Invalid character (Unicode: 0x11) ... Expected a literal entity value or PUBLIC/SYSTEM identifier ... Not well-formed (invalid token) ... Parsing aborted.

But typing <!ENTITY nbsp "nbsp "> did the job for both, Framemaker and the scripts.

Thank you!

Fabian

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