Highlighted

xml files: Custom Declarations, Header Modifications

Explorer ,
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

Adobe Community Professional
Correct answer by Lynne A. Price | Adobe Community Professional

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

TOPICS
Structured

Views

343

Likes

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

xml files: Custom Declarations, Header Modifications

Explorer ,
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

Adobe Community Professional
Correct answer by Lynne A. Price | Adobe Community Professional

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

TOPICS
Structured

Views

344

Likes

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
Apr 03, 2019 0
Adobe Community Professional ,
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

Likes

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
Reply
Loading...
Apr 03, 2019 0
Explorer ,
Apr 04, 2019

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Apr 04, 2019 0