SlideShare a Scribd company logo
4
Most read
5
Most read
9
Most read
in 37 minutes



                          Episode 14
                Deploying Schemas and XMetaL
                     Customization Files

                     Derek Read, XMetaL Technical Support




Brought to you by XMetaL Technical Services                 © 2010 JustSystems Inc.
Agenda
 • Application-Level vs Document-Level Customizations
 • How does XMetaL Author…
    – …locate a DTD?
    – …locate an XSD (W3C Schema)?
    – …locate customization files?
 • Complex Customizations, XAC files, XMetaL Developer
 • Debugging the lookup process

 • Questions




                                                   © 2010 JustSystems Inc.
Application-Level Customizations
 • One or more macros contained in an MCR file loaded at
   application initialization.
 • May include supporting files (XFT, config and any other
   file types) called from or used by the macros.
 • Macros loaded at startup:
    <xmetal install>Macrosxmetal.mcr
    <xmetal install>Macrosmacros.mcr
    <xmetal install>Startup*.mcr

 • Other files may be located anywhere.
 • Include macros in your own custom *.mcr file in Startup
   folder unless required by specific APIs (as documented).
 • Toolbars and menus are best customized using script
   and not delivered as *.TBR files.

                                                      © 2010 JustSystems Inc.
Startup Sequence
 • The basic startup sequence for XMetaL Author includes:
    – Load catalog files into memory.
    – Load Application-Level macros and fire any relevant
      events.

 • This means that for any changes to catalog and
   Application-Level macros to take effect XMetaL Author
   must be restarted.




                                                      © 2010 JustSystems Inc.
Document-Level Customizations
 • A schema (DTD* or XSD*) and all files used to enhance
   the editing experience for an author working with
   documents based on that schema.
 • Minimum customization includes:
     – schemaName.dtd / schemaName.xsd / schemaName.rlx /
       schemaName.rld / schemaName.rls (SGML DTD)
     – schemaName.css**
     – schemaName.ctm**

 * DTD or XSD may reference other files, such as *.mod, *.ent, etc.
 ** If these files are not present they will be auto-generated. So, all
      customizations should include properly designed files of these types to
      provide the best authoring experience.



                                                                           © 2010 JustSystems Inc.
Document-Level Customizations                                (continued…)




 • Optional file types (loaded if found):
     –   schemaName_structure.css*
     –   schemaName.mcr
     –   schemaName.tbr**
     –   schemaName.att
     –   <path><filename>.xft***


 * Will be auto-generated if not found when the main CSS file is auto-generated.
     If the main CSS file is found but this file is missing
     schemaName_structure.css will not be auto-generated.
 ** Recommend modifying toolbars and menus via script as delivery of updates
     to these settings through TBR files can be troublesome.
 *** Loaded according to <XFTReplacements> settings in the CTM file.



                                                                            © 2010 JustSystems Inc.
Document-Level Customizations               (continued…)




 • You may choose to distribute only the compiled form of a
   DTD or XSD (RLX/RLS or RLD file).

 • Compiled form may be useful when the DTD or XSD
   references many other files (file management).

 • You may wish to reduce chances of end users modifying
   the schema.




                                                           © 2010 JustSystems Inc.
Locating a DTD




                 © 2010 JustSystems Inc.
Locating an XSD (W3C Schema)




                               © 2010 JustSystems Inc.
Locating Customization Files
 • Look in same folder as schema (DTD / XSD / RLX / RLD
    / RLS) and load any of the following if found:
     schemaName.xac*
     schemaName.css
     schemaName_structure.css
     schemaName.ctm
     schemaName.mcr

 * XAC should take precedence. The XAC should be unpacked and the files it
    contains used. However, we do not support mixing XAC with a “traditional”
    set of customization files so it is best to distribute one or the other. Note as
    well that the XAC file itself should normally contain the rules file (usually the
    compiled version in RLX or RLD form) so an external rules file is not
    necessary when a XAC file is used.



                                                                              © 2010 JustSystems Inc.
Locating Customization Files                                     (continued…)




 • If not found in same folder as schema then load*:
      <xmetal   install>DisplayschemaName.css
      <xmetal   install>DisplayschemaName_structure.css
      <xmetal   install>RulesschemaName.ctm
      <xmetal   install>MacrosschemaName.mcr


 * There are INI settings to alter these paths. Refer to the   XMetaL Developer
     Customization Guide.




                                                                                  © 2010 JustSystems Inc.
Locating Customization Files                                    (continued…)




 • If still not found:
    schemaName.css : auto-generate.
    schemaName.ctm : auto-generate.
    schemaName_structure.css :
       If schemaName.css was auto-generated then auto-generated,
       else if schemaName.css was found then this will not auto-generate.
    schemaName.mcr : fail to load.


 • Auto-generated files should end up here:
    %appdata%SoftQuadXMetaL6.0gen<drive><recreate schema path>
    Example:
       C:Documents and SettingsdreadApplication
       DataSoftQuadXMetaL6.0genCmyDTDs*.*




                                                                               © 2010 JustSystems Inc.
Complex Customizations
 • Customizations may consist of many files.
 • Keep files close together whenever possible.
 • Place files in well-known locations.
   ActiveDocument.ResourceSet provides information
   about all files loaded automatically (via XAC or
   otherwise).




                                                  © 2010 JustSystems Inc.
Complex Customizations                  (continued…)




 • For file types that are not automatically located there are
   APIs to help:
    – ActiveDocument.RulesFile tells you the location of the
      active schema. Useful for finding files delivered in XAC file or
      otherwise located relative to the schema (DTD, XSD, RLX, RLD,
      RLS).
    – Application.Path gives location to xmetal60.exe. Lets you
      do things like (JScript): Application.Path+"Rules"
 • Use Windows Environment Variables to create “limited-
   user savvy” customizations when constructing file paths.
   Examples:
    %temp%, %appdata%, %userprofile%, etc…




                                                                © 2010 JustSystems Inc.
On_Application_Resolve_Entity
 Example:
  <MACRO name="On_Application_Resolve_Entity" hide="false" lang="JScript"><![CDATA[
    //Put this macro in StartupmyApplicationMacros.mcr
    var msg = "";
    var entInfo = Application.ResolveEntityInfo;
    msg += "From doctype declaration (DTD or XSD?): ";
    msg += entInfo.IsDocType();

   //Following properties are read/write.
   //This is where you would do any overrides.
   //Any “read” comes from the XML file
   //a “write” affects memory only.
   msg += "nSYSTEM id: " + entInfo.systemID;
   msg += "nPUBLIC id: " + entInfo.publicID;

    Application.Alert(msg);
  ]]></MACRO>




                                                                                © 2010 JustSystems Inc.
What About XFT Forms?
 • Path to XFT is relative to the CTM file. If the CTM file is
   found then the XFT will be found.
 • When using Application.CreateFormDlg() the
   XFT path should be a full path.
 • To find the full path for any file delivered by XAC
   (including XFT) use script similar to this:

     //JScript Example:
     var rfPath = ActiveDocument.RulesFile;
     var xacFolder = rfPath.substr(0,rfPath.lastIndexOf(""));
     var myForm = xacFolder + "myform.xft";
     Application.CreateFormDlg(myForm);




                                                            © 2010 JustSystems Inc.
XAC Files
 • XMetaL Developer builds both a XAC file and a
   “traditional” customization (RLX + CSS + CTM + MCR +
   other).

 • XAC file consists of a ZIP archive (renamed *.xac)
   containing all customization files and a manifest.

 • Unpacked to a temp folder before being opened.




                                                        © 2010 JustSystems Inc.
XAC Files    (continued…)




 • XMetaL Developer puts all files in the same folder when
   building. Distribute either XAC or “traditional” files only.
   Do not distribute both.

 • When designing complex customizations my personal
   preference is to avoid XAC files as the unpacking
   process can add a little bit of complexity.




                                                           © 2010 JustSystems Inc.
XMetaL Developer
 • Using F5 to debug XMetaL Author from within XMetaL
   Developer triggers some additional functionality that
   links the current project (schema and other files) directly
   to XMetaL Author (or XMAX).
 • CSS and CTM files can be modified in XMetaL
   Developer and these changes are automatically
   reflected in the authoring tool.
 • XMetaL Author adds two items to the Edit menu to allow
   you to jump back to a particular element in either the
   CSS or CTM editor.




                                                         © 2010 JustSystems Inc.
XMetaL Developer      (continued…)




 • Usually macros can be modified with an “edit
   and continue” feature.
   – Exceptions are adding new macros and certain
     events.
 • Always test customizations on a machine that
   does not have XMetaL Developer installed as a
   final step before distributing to end users.




                                                    © 2010 JustSystems Inc.
CMS Systems
 • Some CMS integrations require document-level
   customization files to be installed on the client machine.

 • Some CMS integrations store document-level
   customization files in the CMS and push these files to
   the client machine when documents are checked out.

 • In both cases the CMS integration provider should
   provide documentation on where XMetaL customization
   files should be placed and how to configure them to work
   with that particular CMS.


                                                         © 2010 JustSystems Inc.
Settings for Troubleshooting
 • Use the following xmetal60.ini settings to troubleshoot
    DTD and XSD look-up problems.
    make_log_file = yes *
    log_file = <path> **

 * Default is „no‟.
 ** Default is the install folder for xmetal60.exe so on some systems (non-
     admins / UAC enabled) you will need to alter this. Specify the full path and
     filename of the file. Example: C:tempxm_lookup.log




                                                                            © 2010 JustSystems Inc.
Q&A
 Thank you for attending!



 Next “37 Minute” Webinar:

               Watch for an announcement at
                 http://forums.xmetal.com




                                              © 2010 JustSystems Inc.

More Related Content

PDF
The end of polling : why and how to transform a REST API into a Data Streamin...
PDF
[Cloud OnAir] GCP でできる Lift & Shift 〜 移行支援ツールも各種ご紹介 〜 2019年1月17日 放送
PPTX
Integrating Apache Spark and NiFi for Data Lakes
PPTX
Microsoft Azure BI Solutions in the Cloud
PPTX
Security and Data Governance using Apache Ranger and Apache Atlas
PDF
Snowflake free trial_lab_guide
PDF
DASK and Apache Spark
PDF
Explore your prometheus data in grafana - Promcon 2018
The end of polling : why and how to transform a REST API into a Data Streamin...
[Cloud OnAir] GCP でできる Lift & Shift 〜 移行支援ツールも各種ご紹介 〜 2019年1月17日 放送
Integrating Apache Spark and NiFi for Data Lakes
Microsoft Azure BI Solutions in the Cloud
Security and Data Governance using Apache Ranger and Apache Atlas
Snowflake free trial_lab_guide
DASK and Apache Spark
Explore your prometheus data in grafana - Promcon 2018

What's hot (20)

PDF
Azure Event Hubs - Behind the Scenes With Kasun Indrasiri | Current 2022
PDF
Robust MLOps with Open-Source: ModelDB, Docker, Jenkins, and Prometheus
PDF
Introduction SQL Analytics on Lakehouse Architecture
PDF
Azure Data Platform Overview.pdf
PDF
Sparser: Faster Parsing of Unstructured Data Formats in Apache Spark with Fir...
PDF
Making DSpace XMLUI Your Own
PDF
What's the time? ...and why? (Mattias Sax, Confluent) Kafka Summit SF 2019
PDF
How to Utilize MLflow and Kubernetes to Build an Enterprise ML Platform
PPTX
Cassandra Data Modeling - Practical Considerations @ Netflix
PPTX
Presto: SQL-on-anything
PDF
Designing ETL Pipelines with Structured Streaming and Delta Lake—How to Archi...
PPTX
Optimizing Apache Spark SQL Joins
PDF
【ウェブ セミナー】AI 時代のクラウド データ ウェアハウス Azure SQL Data Warehouse [実践編]
PDF
Adaptive Query Execution: Speeding Up Spark SQL at Runtime
PPTX
Prometheus - Intro, CNCF, TSDB,PromQL,Grafana
PPTX
An Intro to Elasticsearch and Kibana
PDF
Couchbase Day
PDF
A Journey into Databricks' Pipelines: Journey and Lessons Learned
PPTX
Real time big data stream processing
PDF
[DSC DACH 23] The Modern Data Stack - Bogdan Pirvu
Azure Event Hubs - Behind the Scenes With Kasun Indrasiri | Current 2022
Robust MLOps with Open-Source: ModelDB, Docker, Jenkins, and Prometheus
Introduction SQL Analytics on Lakehouse Architecture
Azure Data Platform Overview.pdf
Sparser: Faster Parsing of Unstructured Data Formats in Apache Spark with Fir...
Making DSpace XMLUI Your Own
What's the time? ...and why? (Mattias Sax, Confluent) Kafka Summit SF 2019
How to Utilize MLflow and Kubernetes to Build an Enterprise ML Platform
Cassandra Data Modeling - Practical Considerations @ Netflix
Presto: SQL-on-anything
Designing ETL Pipelines with Structured Streaming and Delta Lake—How to Archi...
Optimizing Apache Spark SQL Joins
【ウェブ セミナー】AI 時代のクラウド データ ウェアハウス Azure SQL Data Warehouse [実践編]
Adaptive Query Execution: Speeding Up Spark SQL at Runtime
Prometheus - Intro, CNCF, TSDB,PromQL,Grafana
An Intro to Elasticsearch and Kibana
Couchbase Day
A Journey into Databricks' Pipelines: Journey and Lessons Learned
Real time big data stream processing
[DSC DACH 23] The Modern Data Stack - Bogdan Pirvu
Ad

Similar to Deploying Schemas and XMetaL Customization Files (20)

PPTX
XMetaL Macros for Non-Programmers
PDF
Acad acg
PPTX
Fine-tuning the DITA customization
PDF
XMetaL and DITA in the Marketing Department: Tastes Great, Less Filling
KEY
Advanced Techniques for Ext Designer
PDF
RadPHP XE2 Feature Matrix
PPT
65 New Highlights of XMetaL Author Enterprise 7.0
PPTX
DSpace 4.2 XMLUI Theming
PDF
autocad.pdf
PPTX
Quick and Easy Usability in XMetaL Author
PDF
COE 2017: Your first 3DEXPERIENCE customization
PDF
Customizing IBM Connections - LS2012
PDF
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0
PPT
Bri forum advanced web interface customizations
PDF
Plesk Custom Skins
PDF
EMC Documentum xCP 2.x Tips for application migration v1.1
PPT
Understanding and Configuring the FO Plug-in for Generating PDF Files: Part I...
PPT
Directory services by SAJID
PPT
Advanced Web Interface Customizations - BriForum 2010
PDF
XML Tutor maXbox starter27
XMetaL Macros for Non-Programmers
Acad acg
Fine-tuning the DITA customization
XMetaL and DITA in the Marketing Department: Tastes Great, Less Filling
Advanced Techniques for Ext Designer
RadPHP XE2 Feature Matrix
65 New Highlights of XMetaL Author Enterprise 7.0
DSpace 4.2 XMLUI Theming
autocad.pdf
Quick and Easy Usability in XMetaL Author
COE 2017: Your first 3DEXPERIENCE customization
Customizing IBM Connections - LS2012
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0
Bri forum advanced web interface customizations
Plesk Custom Skins
EMC Documentum xCP 2.x Tips for application migration v1.1
Understanding and Configuring the FO Plug-in for Generating PDF Files: Part I...
Directory services by SAJID
Advanced Web Interface Customizations - BriForum 2010
XML Tutor maXbox starter27
Ad

More from XMetaL (6)

PPTX
Displaying additional image types in XMetaL
PPTX
Dropping content isn't a drag!
PPT
Putting DITA Localization into Practice
PPT
DITA Open Toolkit Deployment with XMetaL Author Enterprise 6
PDF
Taking Advantage of XMetaL’s XInclude Support
PPTX
XMetaL Dialog Odds & Ends
Displaying additional image types in XMetaL
Dropping content isn't a drag!
Putting DITA Localization into Practice
DITA Open Toolkit Deployment with XMetaL Author Enterprise 6
Taking Advantage of XMetaL’s XInclude Support
XMetaL Dialog Odds & Ends

Deploying Schemas and XMetaL Customization Files

  • 1. in 37 minutes Episode 14 Deploying Schemas and XMetaL Customization Files Derek Read, XMetaL Technical Support Brought to you by XMetaL Technical Services © 2010 JustSystems Inc.
  • 2. Agenda • Application-Level vs Document-Level Customizations • How does XMetaL Author… – …locate a DTD? – …locate an XSD (W3C Schema)? – …locate customization files? • Complex Customizations, XAC files, XMetaL Developer • Debugging the lookup process • Questions © 2010 JustSystems Inc.
  • 3. Application-Level Customizations • One or more macros contained in an MCR file loaded at application initialization. • May include supporting files (XFT, config and any other file types) called from or used by the macros. • Macros loaded at startup: <xmetal install>Macrosxmetal.mcr <xmetal install>Macrosmacros.mcr <xmetal install>Startup*.mcr • Other files may be located anywhere. • Include macros in your own custom *.mcr file in Startup folder unless required by specific APIs (as documented). • Toolbars and menus are best customized using script and not delivered as *.TBR files. © 2010 JustSystems Inc.
  • 4. Startup Sequence • The basic startup sequence for XMetaL Author includes: – Load catalog files into memory. – Load Application-Level macros and fire any relevant events. • This means that for any changes to catalog and Application-Level macros to take effect XMetaL Author must be restarted. © 2010 JustSystems Inc.
  • 5. Document-Level Customizations • A schema (DTD* or XSD*) and all files used to enhance the editing experience for an author working with documents based on that schema. • Minimum customization includes: – schemaName.dtd / schemaName.xsd / schemaName.rlx / schemaName.rld / schemaName.rls (SGML DTD) – schemaName.css** – schemaName.ctm** * DTD or XSD may reference other files, such as *.mod, *.ent, etc. ** If these files are not present they will be auto-generated. So, all customizations should include properly designed files of these types to provide the best authoring experience. © 2010 JustSystems Inc.
  • 6. Document-Level Customizations (continued…) • Optional file types (loaded if found): – schemaName_structure.css* – schemaName.mcr – schemaName.tbr** – schemaName.att – <path><filename>.xft*** * Will be auto-generated if not found when the main CSS file is auto-generated. If the main CSS file is found but this file is missing schemaName_structure.css will not be auto-generated. ** Recommend modifying toolbars and menus via script as delivery of updates to these settings through TBR files can be troublesome. *** Loaded according to <XFTReplacements> settings in the CTM file. © 2010 JustSystems Inc.
  • 7. Document-Level Customizations (continued…) • You may choose to distribute only the compiled form of a DTD or XSD (RLX/RLS or RLD file). • Compiled form may be useful when the DTD or XSD references many other files (file management). • You may wish to reduce chances of end users modifying the schema. © 2010 JustSystems Inc.
  • 8. Locating a DTD © 2010 JustSystems Inc.
  • 9. Locating an XSD (W3C Schema) © 2010 JustSystems Inc.
  • 10. Locating Customization Files • Look in same folder as schema (DTD / XSD / RLX / RLD / RLS) and load any of the following if found: schemaName.xac* schemaName.css schemaName_structure.css schemaName.ctm schemaName.mcr * XAC should take precedence. The XAC should be unpacked and the files it contains used. However, we do not support mixing XAC with a “traditional” set of customization files so it is best to distribute one or the other. Note as well that the XAC file itself should normally contain the rules file (usually the compiled version in RLX or RLD form) so an external rules file is not necessary when a XAC file is used. © 2010 JustSystems Inc.
  • 11. Locating Customization Files (continued…) • If not found in same folder as schema then load*: <xmetal install>DisplayschemaName.css <xmetal install>DisplayschemaName_structure.css <xmetal install>RulesschemaName.ctm <xmetal install>MacrosschemaName.mcr * There are INI settings to alter these paths. Refer to the XMetaL Developer Customization Guide. © 2010 JustSystems Inc.
  • 12. Locating Customization Files (continued…) • If still not found: schemaName.css : auto-generate. schemaName.ctm : auto-generate. schemaName_structure.css : If schemaName.css was auto-generated then auto-generated, else if schemaName.css was found then this will not auto-generate. schemaName.mcr : fail to load. • Auto-generated files should end up here: %appdata%SoftQuadXMetaL6.0gen<drive><recreate schema path> Example: C:Documents and SettingsdreadApplication DataSoftQuadXMetaL6.0genCmyDTDs*.* © 2010 JustSystems Inc.
  • 13. Complex Customizations • Customizations may consist of many files. • Keep files close together whenever possible. • Place files in well-known locations. ActiveDocument.ResourceSet provides information about all files loaded automatically (via XAC or otherwise). © 2010 JustSystems Inc.
  • 14. Complex Customizations (continued…) • For file types that are not automatically located there are APIs to help: – ActiveDocument.RulesFile tells you the location of the active schema. Useful for finding files delivered in XAC file or otherwise located relative to the schema (DTD, XSD, RLX, RLD, RLS). – Application.Path gives location to xmetal60.exe. Lets you do things like (JScript): Application.Path+"Rules" • Use Windows Environment Variables to create “limited- user savvy” customizations when constructing file paths. Examples: %temp%, %appdata%, %userprofile%, etc… © 2010 JustSystems Inc.
  • 15. On_Application_Resolve_Entity Example: <MACRO name="On_Application_Resolve_Entity" hide="false" lang="JScript"><![CDATA[ //Put this macro in StartupmyApplicationMacros.mcr var msg = ""; var entInfo = Application.ResolveEntityInfo; msg += "From doctype declaration (DTD or XSD?): "; msg += entInfo.IsDocType(); //Following properties are read/write. //This is where you would do any overrides. //Any “read” comes from the XML file //a “write” affects memory only. msg += "nSYSTEM id: " + entInfo.systemID; msg += "nPUBLIC id: " + entInfo.publicID; Application.Alert(msg); ]]></MACRO> © 2010 JustSystems Inc.
  • 16. What About XFT Forms? • Path to XFT is relative to the CTM file. If the CTM file is found then the XFT will be found. • When using Application.CreateFormDlg() the XFT path should be a full path. • To find the full path for any file delivered by XAC (including XFT) use script similar to this: //JScript Example: var rfPath = ActiveDocument.RulesFile; var xacFolder = rfPath.substr(0,rfPath.lastIndexOf("")); var myForm = xacFolder + "myform.xft"; Application.CreateFormDlg(myForm); © 2010 JustSystems Inc.
  • 17. XAC Files • XMetaL Developer builds both a XAC file and a “traditional” customization (RLX + CSS + CTM + MCR + other). • XAC file consists of a ZIP archive (renamed *.xac) containing all customization files and a manifest. • Unpacked to a temp folder before being opened. © 2010 JustSystems Inc.
  • 18. XAC Files (continued…) • XMetaL Developer puts all files in the same folder when building. Distribute either XAC or “traditional” files only. Do not distribute both. • When designing complex customizations my personal preference is to avoid XAC files as the unpacking process can add a little bit of complexity. © 2010 JustSystems Inc.
  • 19. XMetaL Developer • Using F5 to debug XMetaL Author from within XMetaL Developer triggers some additional functionality that links the current project (schema and other files) directly to XMetaL Author (or XMAX). • CSS and CTM files can be modified in XMetaL Developer and these changes are automatically reflected in the authoring tool. • XMetaL Author adds two items to the Edit menu to allow you to jump back to a particular element in either the CSS or CTM editor. © 2010 JustSystems Inc.
  • 20. XMetaL Developer (continued…) • Usually macros can be modified with an “edit and continue” feature. – Exceptions are adding new macros and certain events. • Always test customizations on a machine that does not have XMetaL Developer installed as a final step before distributing to end users. © 2010 JustSystems Inc.
  • 21. CMS Systems • Some CMS integrations require document-level customization files to be installed on the client machine. • Some CMS integrations store document-level customization files in the CMS and push these files to the client machine when documents are checked out. • In both cases the CMS integration provider should provide documentation on where XMetaL customization files should be placed and how to configure them to work with that particular CMS. © 2010 JustSystems Inc.
  • 22. Settings for Troubleshooting • Use the following xmetal60.ini settings to troubleshoot DTD and XSD look-up problems. make_log_file = yes * log_file = <path> ** * Default is „no‟. ** Default is the install folder for xmetal60.exe so on some systems (non- admins / UAC enabled) you will need to alter this. Specify the full path and filename of the file. Example: C:tempxm_lookup.log © 2010 JustSystems Inc.
  • 23. Q&A Thank you for attending! Next “37 Minute” Webinar: Watch for an announcement at http://forums.xmetal.com © 2010 JustSystems Inc.