Allowing external XML/RNG file to dictate optional content for web custom framework
Posted: Thu Sep 15, 2016 3:26 pm
Hi,
I have a predicament on optional content that comes out of custom frameworks for Web Author only allowing use of a single schema, and that which must be embedded in the custom framework files.
Here is my scenario (that will be common across my custom frameworks):
I have successfully created simple custom frameworks, each based on an RNG schema and a single CSS. I had also been able to create multiple sub-frameworks by defining different document structures within a single RNG and multiple CSS, and the fact I can present multiple templates from the same RNG means the end-user doesn't need to be concerned with the fact I have modeled multiple document structures in a single schema which gets picked up by a 'choice' within the <start> section of the RNG grammar. Also, it should be noted that we use the SharePoint plugin so any instances of using templates are saved in SharePoint documents location within a chosen subsite, whereby file structure local to the saved document is the SP location.
All that is fine for general structure whereby the templates are to be non-specific to context of document, only the structure of type of document is defined. For example, I have two templates under the same custom framework using a single RNG which allows engineers in my team to capture system components information either by a) a document template that categorizes entities and relationships are optionally defined, or b) a document template that enables a hierarchy/tree of entities to be defined, thus critically capturing relationships.
However, as these templates are not to be specific to any system, so that they can be reused for any number of (conceptual or physical) systems my team architect and develop, contextual content such as categories and entity types specific to a system must be dynamically defined during each INSTANCE of using the templates, but more importantly are to be restricted content so that these elements can be form-controlled (e.g. selection of content from a combobox which I have managed to achieve), but the engineers must be able to open an XML file or at worst, an RNG file, local to the saved instance of the chosen template, and add new content options to be picked up by the form so that they do not have to be manually inserted repeatedly in the main document (thus avoiding inconsistencies from typos etc).
Locally on my desktop I was easily able to achieve this by placing a second RNG file defining only content choices that gets included in the main one for document structure, but a custom framework only allows one schema OR an overriding by a different schema if I were to define it in the XML document. Please also bear in mind that only I, the technical author, have access to the custom framework configurations - everyone else will use these from the client-side sharepoint/web author interface. So any second RNG defining content choices would be to be sitting in a sharepoint folder for engineers to access and edit.
I get the feeling that XML catalogs would solve my problem, whereby my template can be predefined as pointing to a local file (e.g. called contentChoices.rng) in the same SP folder as the instance document, but I don't know enough about XML catalogs to know whether the main RNG would still be used and allow inclusion of this content choice rng sitting in a different location (as the main schema is in the frameworks folder server-side) - or perhaps there is a way (and this would be preferred) whereby the main RNG would allow content choices to be picked up from a referenced XML file (e.g. created as contentChoices.xml) local to the instance of the main document template within the sharepoint folder. But I'm not sure if RelaxNG or web author/custom frameworks would allow for referencing files that have not been created yet at the point of just being a template.
I hope that wasn't too confusing. The problem I feel is actually quite simple and the fact it can be done locally frustrates me that I seem to be hitting barriers through custom frameworks and indeed the fact web author relies on the schema location to be in a different place to the user's local file system (sharepoint in my case) such that I can't predefine any local schema location in the main schema because this is unknown (e.g. new documents created in different sharepoint sites and subsites). I also feel my lack of knowledge in XML catalogs and indeed how to do XML referencing (I still can't get my head around namespaces) is hindering me.
I would really appreciate any solutions.
Many thanks,
Aliah
I have a predicament on optional content that comes out of custom frameworks for Web Author only allowing use of a single schema, and that which must be embedded in the custom framework files.
Here is my scenario (that will be common across my custom frameworks):
I have successfully created simple custom frameworks, each based on an RNG schema and a single CSS. I had also been able to create multiple sub-frameworks by defining different document structures within a single RNG and multiple CSS, and the fact I can present multiple templates from the same RNG means the end-user doesn't need to be concerned with the fact I have modeled multiple document structures in a single schema which gets picked up by a 'choice' within the <start> section of the RNG grammar. Also, it should be noted that we use the SharePoint plugin so any instances of using templates are saved in SharePoint documents location within a chosen subsite, whereby file structure local to the saved document is the SP location.
All that is fine for general structure whereby the templates are to be non-specific to context of document, only the structure of type of document is defined. For example, I have two templates under the same custom framework using a single RNG which allows engineers in my team to capture system components information either by a) a document template that categorizes entities and relationships are optionally defined, or b) a document template that enables a hierarchy/tree of entities to be defined, thus critically capturing relationships.
However, as these templates are not to be specific to any system, so that they can be reused for any number of (conceptual or physical) systems my team architect and develop, contextual content such as categories and entity types specific to a system must be dynamically defined during each INSTANCE of using the templates, but more importantly are to be restricted content so that these elements can be form-controlled (e.g. selection of content from a combobox which I have managed to achieve), but the engineers must be able to open an XML file or at worst, an RNG file, local to the saved instance of the chosen template, and add new content options to be picked up by the form so that they do not have to be manually inserted repeatedly in the main document (thus avoiding inconsistencies from typos etc).
Locally on my desktop I was easily able to achieve this by placing a second RNG file defining only content choices that gets included in the main one for document structure, but a custom framework only allows one schema OR an overriding by a different schema if I were to define it in the XML document. Please also bear in mind that only I, the technical author, have access to the custom framework configurations - everyone else will use these from the client-side sharepoint/web author interface. So any second RNG defining content choices would be to be sitting in a sharepoint folder for engineers to access and edit.
I get the feeling that XML catalogs would solve my problem, whereby my template can be predefined as pointing to a local file (e.g. called contentChoices.rng) in the same SP folder as the instance document, but I don't know enough about XML catalogs to know whether the main RNG would still be used and allow inclusion of this content choice rng sitting in a different location (as the main schema is in the frameworks folder server-side) - or perhaps there is a way (and this would be preferred) whereby the main RNG would allow content choices to be picked up from a referenced XML file (e.g. created as contentChoices.xml) local to the instance of the main document template within the sharepoint folder. But I'm not sure if RelaxNG or web author/custom frameworks would allow for referencing files that have not been created yet at the point of just being a template.
I hope that wasn't too confusing. The problem I feel is actually quite simple and the fact it can be done locally frustrates me that I seem to be hitting barriers through custom frameworks and indeed the fact web author relies on the schema location to be in a different place to the user's local file system (sharepoint in my case) such that I can't predefine any local schema location in the main schema because this is unknown (e.g. new documents created in different sharepoint sites and subsites). I also feel my lack of knowledge in XML catalogs and indeed how to do XML referencing (I still can't get my head around namespaces) is hindering me.
I would really appreciate any solutions.
Many thanks,
Aliah