Highlighted

FrameMaker docbook xml validator namespace error

Community Beginner ,
Oct 20, 2019

Copy link to clipboard

Copied

I'm trying to open an xml file in which I define a docbook namespace but FrameMaker considers the xmlns token as an attribute.

I'm using FrameMaker 2017.

For the attached file, I get the following error (copied from the Console pod)

The "Courier" Font is not available.
"Courier New" will be used in this session.
The "Zapfdingbats Regular" Font is not available.
"AdobePiStd" will be used in this session.
XML Read Report Log
Source Document: C:\Users\IBM_ADMIN\sample.xml

XML Parser Messages (Document Prolog)
Error at file C:\Users\IBM_ADMIN\sample.xml, line 6, char 51, Message: Attribute 'xmlns' is not declared for element 'book'
Error at line 6, char 51, Message: Attribute '{http://www.w3.org/2000/xmlns/}xi' is not declared for element 'book'
Error at line 17, char 41, Message: Unknown element 'xi:include'

<... more errors...>

TOPICS
Structured

Views

492

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

FrameMaker docbook xml validator namespace error

Community Beginner ,
Oct 20, 2019

Copy link to clipboard

Copied

I'm trying to open an xml file in which I define a docbook namespace but FrameMaker considers the xmlns token as an attribute.

I'm using FrameMaker 2017.

For the attached file, I get the following error (copied from the Console pod)

The "Courier" Font is not available.
"Courier New" will be used in this session.
The "Zapfdingbats Regular" Font is not available.
"AdobePiStd" will be used in this session.
XML Read Report Log
Source Document: C:\Users\IBM_ADMIN\sample.xml

XML Parser Messages (Document Prolog)
Error at file C:\Users\IBM_ADMIN\sample.xml, line 6, char 51, Message: Attribute 'xmlns' is not declared for element 'book'
Error at line 6, char 51, Message: Attribute '{http://www.w3.org/2000/xmlns/}xi' is not declared for element 'book'
Error at line 17, char 41, Message: Unknown element 'xi:include'

<... more errors...>

TOPICS
Structured

Views

493

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
Oct 20, 2019 0
Enthusiast ,
Oct 21, 2019

Copy link to clipboard

Copied

Hi depaulfm,

The problem you've encountered is due to the use of a DTD to define the XML structure and validation options. DTDs were invented long before the idea of XML namespaces was introduced. Because of this a DTD sees any element or attributes with prefix-colon-name construct as just a another XML name that happens to include a colon, nothing special! 

The only way that I'm aware of to make it all work for your needs is to modify the Docbook DTD so that it includes the XInclude element and attribute definitions. Due to FrameMaker's slightly sketchy handle on namespaces I have previously chosen to replicate the function of XInclude using custom non-colonised element names. While that approach is fine if you're developing on a closed system, it can't be used if the XML is distributed far and wide. How do you plan to process the XInclude statements in your output XML? 

I should also mention that there is an official Docbook 4.2 XSD schema available. If you use that instead of the DTD you will be able to add true namespace support. Docbook 4.2

Ian

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...
Oct 21, 2019 0
New Here ,
Nov 04, 2019

Copy link to clipboard

Copied

Ian,

 

Apologies for the late reply. More important, thanks for your details answer and suggestions.  I think I will opt by a pre-processing phase which takes the includes and expand them in-place and a post-processing phase which restores the modified contents back into the individual files.

Cheers,

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...
Nov 04, 2019 0