DeepBlueCLtd / Fi3ldMan

Field Service Manual with advanced data exploitation
https://deepbluecltd.github.io/Fi3ldMan/
Apache License 2.0
1 stars 1 forks source link

Conditional processing in `country` and `region` pages #43

Closed IanMayo closed 9 months ago

IanMayo commented 1 year ago

Somewhere we need to let the author control which content goes into the export.

The users will have a set of partner suppliers:

We have to let the author specify if a class or a country can be included in a custom export for a particular partner.

We can't just do this at the class level, since we must also control if the summary data in the country summary is included.

So, we need to modify the row(s) in the country summary to include a series of 3 checkboxes. These will be titled teledyne, axiomatic and banchio.

I think we will also have to be able to process a region file to indicate which partners that country can go to. I think this will have to go in the europe.ditamap file. Hmm, unfortunately it will also have to go in the europe.dita file, to indicate which countries we include in the table of countries.

At the publishing phase, users will be able customize the transform to specify the (optional) partner this data is going to. The export will then only include country summary elements with the relevant tick. Note: we also can't include the relevant .dita file in the export.

Hmm, that last section seems problematic. I don't really see how the content of france.dita can control which elements of france.dita are published.

From doing some googling the audience parameter may be right solution for this. So, instead of a series of checkboxes, the audience element includes one or more of the above id values.

brahnavank commented 1 year ago
image

Could you please tell is it ok to have as list of attributes as above

IanMayo commented 1 year ago

Yes, but we will need a way for the author to edit which items are in the list.

Aah, hold on. We need the author to specify the items on each row of the table of class items. So, maybe a new column on this table: image

But, the important thing is we want to use DITA conditional export/filtering to let DITA control which items go into the export.

So, the filtering will control two things:

IanMayo commented 1 year ago

Update: here is an example of excluding a group of content: https://docs.oasis-open.org/dita/dita/v1.3/os/part2-tech-content/langRef/ditaval/ditaval-val.html

More detail on doing it here: https://www.oxygenxml.com/doc/versions/25.1/ug-editor/topics/profiling-conditional-text.html

So, to "prove" this, I'd like us to define these audience values:

I'd then like us to:

Then we can do test exports and verify the correct content is omitted for each deny category.

IanMayo commented 1 year ago

Note: this all works. But, we do have to remove convenience links from the home page - since they pull in their parent folders and sister content. Because of this, when I tried to deny-wales (which should exclude Spain content), the Spain content was still present in the export. But, once I deleted those links, the Spain folder was not present in the export.

IanMayo commented 10 months ago

Re-open this. We have re-created our mock content, and we need to re-apply the logic to our current data document set.

IanMayo commented 9 months ago

Handled in #105