SlideShare a Scribd company logo
1 of 20
Download to read offline
in 37 minutes

             Episode 18
  Customize Content with DITA
Conditional Text Part 2: How to Add
  Custom Conditional Attributes

      Su-Laine Yeo, Solutions Consultant
                 March 2011




                                           © 2011 JustSystems
Agenda

• Today‟s slides are on
    http://www.slideshare.net/XMetaL
•   What‟s new at JustSystems
•   Custom conditional text attributes:
    –   Quick review of conditional text functionality
    –   Who needs custom attributes?
    –   How do they work?
    –   How do I get them set up?




                                                         © 2011 JustSystems
What’s new

• JustSystems employees and offices in Japan are OK

• XMetaL Author Enterprise – SP Edition 6.0 is available
   – https support, Sharepoint 2010 support, and more
• Service pack for XMetaL Author and XMAX 6.0 will be
  ready late this month

• Upcoming conferences:
   – Content Management Strategies/DITA North America: Baltimore,
     April 4-6
   – Mark Logic: San Francisco, April 26-29


                                                             © 2011 JustSystems
Review: Conditional text in DITA

“Conditional text” refers to:

• The practice of marking up the content in a single
  source file, so you can create deliverables with different
  subsets of the file.

• The content that is marked up so you can filter it out of
  some deliverables. In DITA, conditional "text" can be
  words, images, tables, index markers, links, etc.



                                                         © 2011 JustSystems
Conditional text

• Marking up the content in a single source file, so you can
  create deliverables with different subsets of the file.
• E.g. Windows-only content (Ctrl+S) and Macintosh-only
  content (Command+S)




                                                        © 2011 JustSystems
Under the covers: XML

 • A paragraph that is not conditional:

                     <p>Press Ctrl+S.</p>

 • A paragraph that applies to the Windows platform only:

   <p platform = "windows">Press Ctrl+S.</p>


         attribute       attribute value



                                                       © 2011 JustSystems
Five predefined attributes
• Only four conditional text attributes work
   in DITA Open Toolkit version 1.4:
  –   product
  –   platform
  –   audience
  –   otherprops


• One additional attribute works after a bug fix in
   DITA Open Toolkit 1.5.2 M2:
  –   props


                                                 © 2011 JustSystems
Adding attribute values is easy


    <p platform = "windows">Press Ctrl+S.</p>

       attribute    attribute value



• You can have as many values as you want for
    any of the 5 predefined attributes
•   But.... adding attributes is a lot harder




                                                © 2011 JustSystems
What if you have…

•   Products: Model100, Model200, Model300
•   Platforms: Windows, Macintosh, Linux
•   Editions: Standard, professional
•   States: Hawaii, California, New York
•   Roles: Teacher, Student
•   Measuring systems: Metric, Imperial

…oops, 6 attributes already


                                             © 2011 JustSystems
Possible approach 1:
Overload attributes
• audience = “Hawaii student”
• audience = “New York”
• audience = “Metric”

Problem: It won‟t work.




                                © 2011 JustSystems
Possible approach 2:
Use other attributes
• Some tools allow you to filter output using any
  attribute, e.g. “rev” and “base”

• Caution: Are you sure you don‟t want to use
  these attributes for something else?

• Caution: Do you want to commit to doing all your
  publishing through these tools?



                                                © 2011 JustSystems
Recommended approach:

• Add new attributes to the DITA DTDs
  – Requires writing and modifying DTD files
  – Each new attribute must be declared as a
    specialization of the “props” attribute


• Good news: New extension pack makes it easier
  – Unzip package and drop files into place
  – Get 5 attributes named “otherprops2” “otherprops3”
    etc.



                                                     © 2011 JustSystems
Demo: DITA 1.1
Conditional Text Extension Pack
Free download from the XMetaL Community
   Forums:
  – http://forums.xmetal.com/index.php/topic,1225.0.html


Drop DTD files in the right places




                                                           © 2011 JustSystems
Caution: Commitment ahead!

• Once you use the new “otherprops#” attributes,
    your content will no longer validate against the
    base DITA 1.1 DTDs
•   All writers and translators will need to install the
    Extension Pack
•   Make sure you can configure all your tools to
    use the DTDs in the Extension Pack
•   Consider setting up “local shell” DTDs



                                                      © 2011 JustSystems
Want to modify DTDs yourself?

• Needed if you want the attributes to have meaningful
  names, or need more than 5 new attributes

• Follow the tutorial here:
   – http://www.xiruss.org/tutorials/dita-specialization/body/part-config-and-
     extend/tutorials/attribute-domain/domain-att-spec-process.html



• Read the section on “Attribute domain specialization
  pattern” here:
   – http://docs.oasis-open.org/dita/v1.1/OS/archspec/dtdmod.html




                                                                                 © 2011 JustSystems
DITA 1.2 Conditional Text
Extension Pack
For DITA 1.2, everything is the same except:

• Download and install the XMetaL DITA 1.2 Configuration
  Kit first
   – Free for XMetaL customers on maintenance (contact your
     account manager, or me at syeo at justsystems dot com)


• Drop files into the “DITA_OT1.5” folder instead of the
  “DITA_OT” folder




                                                              © 2011 JustSystems
Support for the Extension Packs

• Usage in XMetaL Author Enterprise is supported
  by JustSystems

• Licensing terms allow use in other tools
  – With the standard disclaimer that these files may not
    be perfect. Use at your own risk.


• There is a proposal to have the 5 new
  “otherprops#” attributes be part of the DITA 1.3
  standard
                                                       © 2011 JustSystems
Summary

• Conditional text = excellent way to produce customized
  documents which reflect audience variations and product
  variations

• Know the difference between adding attribute values
  and adding attributes

• To add attributes, either modify DTD files, or install the
  DITA 1.x Conditional Text Extension Pack

• Use the ct_config.xml file in XMetaL Author Enterprise to
  display meaningful names
                                                          © 2011 JustSystems
About JustSystems
• Global Presence                                          2,500 Customers,
                                                            Marquee Brands
   – 1,000 employees, „07 revenues of $110M
   – HQ in Japan; Corporate Offices in Vancouver
     and London; Sales Offices Worldwide
• Our Experience
   – Established in 1979
   – Market leader with over 2,500 customers
• Our Expertise
   – Global provider of office productivity, information
     management, consumer & enterprise software
   – Framework for XML-based content creation,
     integration, visualization and delivery
• Our Credibility
   – eContent 100 member in 2009
   – KMWorld Trend-Setting Product Award 2009
   – KM World “100 Companies that Matter” 2010
                                                                              © 2011 JustSystems
Global Customers
   High-Tech       Automotive   Aerospace




   Publishing      Financial      Other




                                            © 2011 JustSystems

More Related Content

More from XMetaL

Deploying Schemas and XMetaL Customization Files
Deploying Schemas and XMetaL Customization FilesDeploying Schemas and XMetaL Customization Files
Deploying Schemas and XMetaL Customization Files
XMetaL
 
DITA Open Toolkit Deployment with XMetaL Author Enterprise 6
DITA Open Toolkit Deployment with XMetaL Author Enterprise 6DITA Open Toolkit Deployment with XMetaL Author Enterprise 6
DITA Open Toolkit Deployment with XMetaL Author Enterprise 6
XMetaL
 
XMetaL Dialog Odds & Ends
XMetaL Dialog Odds & EndsXMetaL Dialog Odds & Ends
XMetaL Dialog Odds & Ends
XMetaL
 

More from XMetaL (7)

Putting DITA Localization into Practice
Putting DITA Localization into PracticePutting DITA Localization into Practice
Putting DITA Localization into Practice
 
XMetaL Macros for Non-Programmers
XMetaL Macros for Non-ProgrammersXMetaL Macros for Non-Programmers
XMetaL Macros for Non-Programmers
 
Deploying Schemas and XMetaL Customization Files
Deploying Schemas and XMetaL Customization FilesDeploying Schemas and XMetaL Customization Files
Deploying Schemas and XMetaL Customization Files
 
DITA Open Toolkit Deployment with XMetaL Author Enterprise 6
DITA Open Toolkit Deployment with XMetaL Author Enterprise 6DITA Open Toolkit Deployment with XMetaL Author Enterprise 6
DITA Open Toolkit Deployment with XMetaL Author Enterprise 6
 
Taking Advantage of XMetaL’s XInclude Support
Taking Advantage of XMetaL’s XInclude SupportTaking Advantage of XMetaL’s XInclude Support
Taking Advantage of XMetaL’s XInclude Support
 
XMetaL Dialog Odds & Ends
XMetaL Dialog Odds & EndsXMetaL Dialog Odds & Ends
XMetaL Dialog Odds & Ends
 
XMetaL and DITA in the Marketing Department: Tastes Great, Less Filling
XMetaL and DITA in the Marketing Department: Tastes Great, Less FillingXMetaL and DITA in the Marketing Department: Tastes Great, Less Filling
XMetaL and DITA in the Marketing Department: Tastes Great, Less Filling
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Customize Content with DITA Conditional Text Part 2: How to Add Custom Conditional Attributes

  • 1. in 37 minutes Episode 18 Customize Content with DITA Conditional Text Part 2: How to Add Custom Conditional Attributes Su-Laine Yeo, Solutions Consultant March 2011 © 2011 JustSystems
  • 2. Agenda • Today‟s slides are on http://www.slideshare.net/XMetaL • What‟s new at JustSystems • Custom conditional text attributes: – Quick review of conditional text functionality – Who needs custom attributes? – How do they work? – How do I get them set up? © 2011 JustSystems
  • 3. What’s new • JustSystems employees and offices in Japan are OK • XMetaL Author Enterprise – SP Edition 6.0 is available – https support, Sharepoint 2010 support, and more • Service pack for XMetaL Author and XMAX 6.0 will be ready late this month • Upcoming conferences: – Content Management Strategies/DITA North America: Baltimore, April 4-6 – Mark Logic: San Francisco, April 26-29 © 2011 JustSystems
  • 4. Review: Conditional text in DITA “Conditional text” refers to: • The practice of marking up the content in a single source file, so you can create deliverables with different subsets of the file. • The content that is marked up so you can filter it out of some deliverables. In DITA, conditional "text" can be words, images, tables, index markers, links, etc. © 2011 JustSystems
  • 5. Conditional text • Marking up the content in a single source file, so you can create deliverables with different subsets of the file. • E.g. Windows-only content (Ctrl+S) and Macintosh-only content (Command+S) © 2011 JustSystems
  • 6. Under the covers: XML • A paragraph that is not conditional: <p>Press Ctrl+S.</p> • A paragraph that applies to the Windows platform only: <p platform = "windows">Press Ctrl+S.</p> attribute attribute value © 2011 JustSystems
  • 7. Five predefined attributes • Only four conditional text attributes work in DITA Open Toolkit version 1.4: – product – platform – audience – otherprops • One additional attribute works after a bug fix in DITA Open Toolkit 1.5.2 M2: – props © 2011 JustSystems
  • 8. Adding attribute values is easy <p platform = "windows">Press Ctrl+S.</p> attribute attribute value • You can have as many values as you want for any of the 5 predefined attributes • But.... adding attributes is a lot harder © 2011 JustSystems
  • 9. What if you have… • Products: Model100, Model200, Model300 • Platforms: Windows, Macintosh, Linux • Editions: Standard, professional • States: Hawaii, California, New York • Roles: Teacher, Student • Measuring systems: Metric, Imperial …oops, 6 attributes already © 2011 JustSystems
  • 10. Possible approach 1: Overload attributes • audience = “Hawaii student” • audience = “New York” • audience = “Metric” Problem: It won‟t work. © 2011 JustSystems
  • 11. Possible approach 2: Use other attributes • Some tools allow you to filter output using any attribute, e.g. “rev” and “base” • Caution: Are you sure you don‟t want to use these attributes for something else? • Caution: Do you want to commit to doing all your publishing through these tools? © 2011 JustSystems
  • 12. Recommended approach: • Add new attributes to the DITA DTDs – Requires writing and modifying DTD files – Each new attribute must be declared as a specialization of the “props” attribute • Good news: New extension pack makes it easier – Unzip package and drop files into place – Get 5 attributes named “otherprops2” “otherprops3” etc. © 2011 JustSystems
  • 13. Demo: DITA 1.1 Conditional Text Extension Pack Free download from the XMetaL Community Forums: – http://forums.xmetal.com/index.php/topic,1225.0.html Drop DTD files in the right places © 2011 JustSystems
  • 14. Caution: Commitment ahead! • Once you use the new “otherprops#” attributes, your content will no longer validate against the base DITA 1.1 DTDs • All writers and translators will need to install the Extension Pack • Make sure you can configure all your tools to use the DTDs in the Extension Pack • Consider setting up “local shell” DTDs © 2011 JustSystems
  • 15. Want to modify DTDs yourself? • Needed if you want the attributes to have meaningful names, or need more than 5 new attributes • Follow the tutorial here: – http://www.xiruss.org/tutorials/dita-specialization/body/part-config-and- extend/tutorials/attribute-domain/domain-att-spec-process.html • Read the section on “Attribute domain specialization pattern” here: – http://docs.oasis-open.org/dita/v1.1/OS/archspec/dtdmod.html © 2011 JustSystems
  • 16. DITA 1.2 Conditional Text Extension Pack For DITA 1.2, everything is the same except: • Download and install the XMetaL DITA 1.2 Configuration Kit first – Free for XMetaL customers on maintenance (contact your account manager, or me at syeo at justsystems dot com) • Drop files into the “DITA_OT1.5” folder instead of the “DITA_OT” folder © 2011 JustSystems
  • 17. Support for the Extension Packs • Usage in XMetaL Author Enterprise is supported by JustSystems • Licensing terms allow use in other tools – With the standard disclaimer that these files may not be perfect. Use at your own risk. • There is a proposal to have the 5 new “otherprops#” attributes be part of the DITA 1.3 standard © 2011 JustSystems
  • 18. Summary • Conditional text = excellent way to produce customized documents which reflect audience variations and product variations • Know the difference between adding attribute values and adding attributes • To add attributes, either modify DTD files, or install the DITA 1.x Conditional Text Extension Pack • Use the ct_config.xml file in XMetaL Author Enterprise to display meaningful names © 2011 JustSystems
  • 19. About JustSystems • Global Presence 2,500 Customers, Marquee Brands – 1,000 employees, „07 revenues of $110M – HQ in Japan; Corporate Offices in Vancouver and London; Sales Offices Worldwide • Our Experience – Established in 1979 – Market leader with over 2,500 customers • Our Expertise – Global provider of office productivity, information management, consumer & enterprise software – Framework for XML-based content creation, integration, visualization and delivery • Our Credibility – eContent 100 member in 2009 – KMWorld Trend-Setting Product Award 2009 – KM World “100 Companies that Matter” 2010 © 2011 JustSystems
  • 20. Global Customers High-Tech Automotive Aerospace Publishing Financial Other © 2011 JustSystems