If you take a look at <LINK REMOVED>, you can see that this book has a preface that pulls in the Common_Content/Conventions.xml file through a xinclude. So you have Introduction 1. Document Conventions (this is the xinclude in the preface) 2. Feedback (this is a section under the preface) We can't replicate this structure in a content spec. To import these old books while preserving their structure we'll need something like the following: Preface: Introduction Initial Text: Introduction [28778] XInclude: Common_Content/Conventions.xml Feedback [28779] XInclude: Common_Content/Conventions.xml is the implied conventions xml that is put into the book before the preface. If it is specifically defined in the spec it should be placed in that location instead.
Firstly we'll need a way to disable the default preface inclusion (see BZ#1016354). Secondly I'm not so sure XInclude is the best reference for this as the only content you will be able to include is the Common Content included in the brand. As such this might be a better alternative: Preface: Introduction Initial Text: Introduction [28778] Common Content: Conventions.xml Feedback [28779]
Another possible option would be to do something like: Preface: Introduction Initial Text: Introduction [28778] Conventions.xml [Common Content] Feedback [28779]
Added in 1.7-SNAPSHOT build 201406041757 The format is the same as my last comment. The file name used is pulled from the title, so in "Conventions.xml [Common Content]", "Common_Content/Conventions.xml" would be the href of the XInclude. Some things to note: - Since the common content is on a per user basis we can't validate the content accurately and as such it may break builds if used incorrectly. - Due to the above report a bug links will also not be included in any "Initial Text" contains that contain Common Content. - Again due to the first point we cannot know the id of the content so relationships and targets cannot be used with Common Content.
Two additional points I forgot is: - The name will attempt to be "fixed" so that spaces are replaced by underscores and the name doesn't have to include ".xml". So the following would all be valid: "Legal Notice [Common Content]", "Legal_Notice.xml [Common Content]", "Legal Notice.xml [Common Content]" - The validator will warn if the file being used isn't a common publican Common Content file.
The default preface is just: Preface: Preface [T1] Conventions.xml [Common Content] Feedback.xml [Common Content] The import tool will now import content with this structure, but this results in the error: ERROR: Line 28: Invalid Preface! No topics or levels in this Preface. -> Preface: Preface [T1]
For the above the default preface should be used, however this is still a bug as you may want to include or reorder the default structure.
Confirmed that the following Custom Content inclusions will reference a file called Test_Content.xml Test Content [Common Content] Test_Content [Common Content] Test Content.xml [Common Content] Test_Content.xml [Common Content]
When a Common Content reference is added as the sole child under a part, like: Part: Title Test Content [Common Content] An error is generated: ERROR: Line 278: Invalid Part! No levels in this Part. -> Part: Test This should be a warning, as it is possible that the common content has the required content to be included under a part.
Fixed in 1.7-SNAPSHOT build 201406171137 Updated the validation rules so that no error or warning will be produced for parts so that it is consistent with the way Common Content elsewhere. Note: This is currently live on the test/development server.
Verified that a part can be saved with only a common content child.
The following will not add the Part to the final build Part: hi Chapter: test Conventions [Common Content] But if you add a topic, the part will build Part: hi Chapter: test A test topic [1234] Conventions [Common Content]
Fixed the build issue in 1.7-SNAPSHOT build 201406171403 There was a check being performed to make sure the level had topics. I've updated this check so it will now look for topics and common content.
The following structure Chapter: test Section: test2 Initial Text: Conventions [Common Content] a [3737] produces the following error ERROR: Line 25: Invalid Section! No levels in this Section and only one Initial Text topic. Sections with only an Initial Text topic are just ordinary topics, so please use the regular topic syntax. -> Section: test2 In this case the Section has two "topics" in the initial text, one just happens to be an external link.
Fixed in 1.7-SNAPSHOT build 201406171614 The validation check for initial content has been updated to check for topics and common content. Note: This is currently live on the test/development server.
All combinations of common content and existing containers that i tried could be saved and built.
Successfully pushed, translated and synced a book with common content with Zanata.