SlideShare une entreprise Scribd logo
1  sur  66
Leverage DXL to Overcome Web Browser Rich Text Limitations Lance Spellman Workflow Studios
What We’ll Cover … ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The Specific Problem to Be Addressed ,[object Object],[object Object],[object Object],Usage Scenarios: ,[object Object],[object Object],[object Object]
How Does Domino Deliver Rich Text to the Web? ,[object Object],[object Object],[object Object],[object Object],[object Object]
What Rich Text Elements Does Domino Have Trouble With? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What Rich Text Elements Does Domino Have Trouble  With? (cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Demonstration: How Domino Handles Rich Text on the Web Domino default rendering of Rich Text to the Web
Rich Text Input with the Notes Client Image floats right of text 2 nd  row starts immediately Table borders of varying thickness Cell padding Picture caption
Rich Text Rendering by Domino to Browser Table rows are equally spaced Table borders are all visible and set to ridge style Picture caption? Paragraph wraps incorrectly Cell padding is NOT observed
What We’ll Cover … ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Exploring Workarounds ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Workaround 1 — Alter the Stored Rich Text, Attempt 1 ,[object Object],[object Object],[object Object],[object Object],[object Object]
Setting HTML Properties to Fix Cell Padding ,[object Object],Firefox works, but exposes table border problem IE shows no change whatsoever
Workaround 1 — Alter the Stored Rich Text, Attempt 2 ,[object Object],[object Object]
Store Contents as HTML and MIME ,[object Object],[object Object],[object Object],Converts to HTML/MIME on document save. Results are MUCH WORSE!
Potential Workaround Methods ,[object Object],[object Object],[object Object]
Browser Rendering of Content Stored as HTML/MIME Attachment has moved out of the table Wrap properties for picture are completely lost Table size is no longer fixed width, but has been converted to page width
Browser Rendering Now Closely Matches Notes?!? ,[object Object],[object Object],[object Object],[object Object]
Demonstration: Saving Rich Text Content as MIME and Viewing It Saving RT content as MIME/HTML
Workaround 1 — Alter the Stored Rich Text, Attempt 3 ,[object Object],[object Object]
Issues with Fixing Stored HTML/MIME ,[object Object],[object Object],[object Object]
Workaround 2 — Fix the Rendering On-the-Fly  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],I am a highly paid (I wish) professional.  Please, do not try this at home!
Workaround 3 — Fix the Rendering After the Fact ,[object Object],[object Object],[object Object],[object Object],[object Object],Tedious, and more importantly,  performance would be awful Caution
Workaround 4 — Provide Alternate Content via DXL ,[object Object],[object Object],[object Object],[object Object],[object Object]
The Secret Sauce is Domino Extensible Language (DXL) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Rich Text Transformed to Correct HTML on Post Save Notes Document Output DXL Transform DXL to HTML Display to Web Display to Web Rich Text Block Post-Save Event HTML Block
What We’ll Cover … ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The Rich Text to DXL to HTML Process Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Understanding the DXL Output of Rich Text ,[object Object],[object Object],[object Object],[object Object]
Demonstration: DXL Process — Rich Text to DXL to HTML Overview of the process for RT to DXL to HTML
Inline Images in Rich Text and DXL ,[object Object],[object Object],[object Object],[object Object],[object Object]
Code That Produces DXL Output ,[object Object],[object Object],[object Object],[object Object],[object Object]
Code Example for DXL Export try { … DxlExporter dxl = session.createDxlExporter(); … // handle inline images in the Rich Text dxl.setConvertNotesBitmapsToGIF(true); // turn DOCTYPE output off because DOM processor  // can't find the DOCTYPE declaration file and errors dxl.setOutputDOCTYPE(false);  String docDxl = dxl.exportDxl(doc); Exports document as XML to a string Changes output of inline pictures from Notes bitmap to GIF
Reviewing DXL Export of Rich Text ,[object Object],[object Object],See doc_dxl.xml for complete sample DXL listing
Identifying the Rich Text Items in DXL Output <item name='MIME_Version'> <text>1.0</text> </item> <item name='body'><richtext> <pardef id='1' align='center' leftmargin='1in'/> <par def='1'><run> <font size='18pt' style='bold'/> Rich Text Is Totally WICKED! </run> </par>… Text Item vs. Rich Text Item
The PARDEF Tag: Style Definitions for Paragraphs ,[object Object],[object Object],[object Object],<pardef id='1' align='center' leftmargin='1in'/>
The PAR Tag: Paragraphs That Are Styled by DEF Attribute ,[object Object],[object Object],[object Object],<par def='1'> <run> <font size='18pt' style='bold'/> Rich Text Is Totally WICKED! </run> </par>
PAR and PARDEF Equivalencies in HTML/CSS PARDEF  =  CSS Selector PARDEF ID attribute =  CSS Class PAR = HTML <p> PAR DEF attribute  = HTML <p class=“”>
Sample PARDEF and PAR Equivalencies ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
DXL’s Representation of Inline Images ,[object Object],[object Object],[object Object],[object Object],[object Object]
DXL Output with setConvertNotesBitmapsToGIF( false ); <picture width='160px' height='135px' scaledheight='1.4063in' scaledwidth='1.6667in' align='right'> <notesbitmap> </notesbitmap> <caption>Mikkel Heisterberg</caption> </picture> lQAmAAAAAAAAAAAAAAABAAAAAAAAACsALwAIAAEACAABADAAAgCWAJUEAAAAAAAAAAAAAC8AgwTN AM8EAR3OAM0ABQQMDgwOwgzCD8IMww4DJyMWzQDNAAEExA7FDMQOBCcjGBbMAMUAAQvCJsMLyBXH FAIeDsIYAhkcywDFAAImFMMawhPJB8USAgUMwhgDAxkcygDFAAEmwhoCEwfCCAIVDcMIBRoNCAAI whPCB8IIAxUNCMISBQgSCAELxAkFBS0ZGA/CBgMPGRbHAMUAAgsTwwcBCMISAgcIwhIDCA0Iwg3E … Base64 encoded content
DXL Output with setConvertNotesBitmapsToGIF( true ); <picture width='160px' height='135px' scaledheight='1.4063in' scaledwidth='1.6667in' align='right'> <gif> </gif> <caption>Mikkel Heisterberg</caption> </picture> R0lGODlhoACHAOcAAPD4+P///xgYICAgKLjAwKiwuBAYGBAQGBggIOjw+BAQECgoMAgQEKCwsKiw sCAoKLC4wCAoMDA4QPDw+HB4gDhASCgwMCgwOLC4uOj4+AgIEBggKBgYGDA4OLjAyAgICEBIUGhw eDAwODhAQKCosEBISEhQWFhgaCAgIDg4QGBocFBYYCgoKDAoKEhQUDgwKHiAiCggIGh4gOjw8EBA SEhIUFBYWKi4uFhgYAAAADAoILDAwCgoIJB4aPDw8AAICDAwMKCwuDg4OHCAiBAYILDAyAAACKCo… Base64 encoded content of GIF that can be saved to a file
DXL’s Representation of Attachments ,[object Object],[object Object],[object Object],[object Object],[object Object]
DXL for File Attachments <attachmentref name='test.pdf‘ displayname='test.pdf'> <picture height='47px' width='43px'> <notesbitmap> lQAmAAAAAAAAAAAAAAABAAAAAAAAACsALwAIAAEACAABADAAAgCWAJUEAAAAAAAAAAAAAC8AgwTN AM8EAR3OAM0ABQQMDgwOwgzCD8IMww4DJyMWzQDNAAEExA7FDMQOBCcjGBbMAMUAAQvCJsMLyBXH FAIeDsIYAhkcywDFAAImFMMawhPJB8USAgUMwhgDAxkcygDFAAEmwhoCEwfCCAIVDcMIBRoNCAAI… </notesbitmap > </picture> </attachmentref> <picture height='47px' width='43px'> <notesbitmap> lQAmAAAAAAAAAAAAAAABAAAAAAAAACsALwAIAAEACAABADAAAgCWAJUEAAAAAAAAAAAAAC8AgwTN AM8EAR3OAM0ABQQMDgwOwgzCD8IMww4DJyMWzQDNAAEExA7FDMQOBCcjGBbMAMUAAQvCJsMLyBXH FAIeDsIYAhkcywDFAAImFMMawhPJB8USAgUMwhgDAxkcygDFAAEmwhoCEwfCCAIVDcMIBRoNCAAI… </notesbitmap > </picture> The attachment filename Picture element is just the icon used to display the file attachment. It is not the file attachment itself.
DXL for File Attachments (cont.) <item name='$FILE' summary='true' sign='true' seal='true'> <object> <file hosttype='msdos' compression='none' flags='storedindoc' encoding='none' name='test.pdf'> <created> <datetime>20051111T180304,3906</datetime> </created> <modified> <datetime>20051111T180304,39-06</datetime> </modified> <filedata> JVBERi0xLjQNCiXDpMO8w7bDnw0KMiAwIG9iag0KPDwgL0xlbmd0aCAzIDAgUg0KICAgL0ZpbHRl… The attachment filename Base64 encoded data of the attachment The file element
What We’ll Cover … ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Produce a W3C DOM Object from Rich Text DXL ,[object Object],[object Object]
Create a DOM Object from DXL Text ,[object Object],[object Object],[object Object],[object Object]
Code for Obtaining a DOM Document from DXL String private org.w3c.dom.Document getDOMDoc(String dxl) { try { // Get Document Builder Factory DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); … // Obtain a document builder object DocumentBuilder builder = factory.newDocumentBuilder(); builder.setErrorHandler(new DefaultHandler()); // Parse the document and return it StringReader reader = new StringReader(dxl); InputSource source = new InputSource(reader); return builder.parse(source); … DocumentBuilder parses a String InputSource to create a DOM Document
Working with DXL Output of Rich Text Inline Image ,[object Object],[object Object],[object Object]
Base64 Libraries Allow Data to Be Decoded and Saved to File ,[object Object],//decode the base64 stream to a temp file Base64.decodeToFile(base64Stream, fullfilepath);
Isolating the Inline Images and Saving Them to Files Element element = domDoc.getDocumentElement(); // find all the inline images in the richtext fields get the picture nodes NodeList pictureNodes = element.getElementsByTagName(&quot;picture&quot;); int numOfPictures = pictureNodes.getLength(); … for (int k=0; k<numOfPictures; k++) { NodeList picChildren = pictureNodes.item(k).getChildNodes();  // gif tags int numOfNodes = picChildren.getLength(); for (int i=0; i<numOfNodes; i++) {  // loop through the <gif> tags Node binaryNode = numOfNodes.item(i).getFirstChild(); String base64Stream = binaryNode.getNodeValue(); … String fullfilepath = filename;  // filename set earlier in code Base64.decodeToFile(base64Stream, fullfilepath);  } } Collects all the picture elements Gets the Base64 data for the picture as a String Decodes and saves file to filesystem
What We’ll Cover … ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Customizing HTML ,[object Object],[object Object],[object Object]
Applying XSL to the DXL DOM Object ,[object Object],[object Object],[object Object],[object Object],[object Object],See DXL2HTML.xsl for complete XSL listing
Selecting the Rich Text Items to Apply Template Rules <xsl:template match=&quot;d:document&quot;> <xsl:apply-templates select=&quot;d:item&quot;/> </xsl:template> <xsl:template match=&quot;d:item&quot;> <xsl:apply-templates select=&quot;d:richtext&quot;/> </xsl:template> <xsl:template match=&quot;d:richtext&quot;> <xsl:apply-templates/> </xsl:template> Starts with document, looks for items, selects only Rich Text items, then applies remaining templates to Rich Text items only
Sample Template for Handling Table Elements <xsl:template match=&quot;d:table&quot;> <table width=&quot;100%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;> <xsl:attribute name=&quot;width&quot;> <xsl:if test=&quot;@widthtype='fitmargins'&quot;>100%</xsl:if> </xsl:attribute> <xsl:attribute name=&quot;style&quot;>border-collapse: collapse; <xsl:if test=&quot;string(d:border/@style)&quot;> border-style:  <xsl:choose> <xsl:when test=&quot;d:border/@style='dot'&quot;>dotted</xsl:when> <xsl:when test=&quot;d:border/@style='dash'&quot;>dashed</xsl:when> <xsl:otherwise><xsl:value-of select=&quot;d:border/@style&quot;/></xsl:otherwise> </xsl:choose>; </xsl:if> … </xsl:template> Template illustrates getting the style attribute from the DXL and converting that to CSS selectors
Implementing the XSL Transformation in Code XSLProcessor xp = new XSLProcessor(new XML4JLiaison4dom()); StringReader xmlSource2 = new StringReader(docDxl); StringReader xslSource2 =  new StringReader(xslProfile.getItemValueString(&quot;RTXSL&quot;)); StringWriter sw = new StringWriter(); XSLTInputSource xs = new XSLTInputSource(xmlSource2); XSLTInputSource xt = new XSLTInputSource(xslSource2); XSLTResultTarget tout = new XSLTResultTarget(sw); xp.process(xs, xt, tout); RichTextItem rt = doc.createRichTextItem(&quot;HTMLTransform&quot;); rt.appendText(sw.toString()); XSL is retrieved from a text field in a Notes document The DXL source DXL is transformed to HTML and saved to the document
Demonstration: Live Debug Session for DXL2HTML.xsl Visual Studio Debugger for  DXL2HTML.xsl
What We’ll Cover … ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Extending the Idea … ,[object Object],[object Object],[object Object]
Acknowledgements ,[object Object],[object Object],[object Object]
Resources for Working with Base64 Encoded Data ,[object Object],[object Object],[object Object],See Script Libraries in dxl_sample.nsf for both Java and LotusScript libraries
Rich Text Handling for Free Resources ,[object Object],[object Object],[object Object],[object Object]
7 Key Points to Take Home ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Your Turn! How to Contact Me: Lance Spellman [email_address]

Contenu connexe

Tendances

What is html xml and xhtml
What is html xml and xhtmlWhat is html xml and xhtml
What is html xml and xhtmlFkdiMl
 
HTML Basics 1 workshop
HTML Basics 1 workshopHTML Basics 1 workshop
HTML Basics 1 workshopJohn Allan
 
Html viva questions
Html viva questionsHtml viva questions
Html viva questionsVipul Naik
 
Practical file on web technology(html)
Practical file on web technology(html)Practical file on web technology(html)
Practical file on web technology(html)RAJWANT KAUR
 
Vskills certified css designer Notes
Vskills certified css designer NotesVskills certified css designer Notes
Vskills certified css designer NotesVskills
 
Origins and evolution of HTML and XHTML
Origins and evolution of HTML and XHTMLOrigins and evolution of HTML and XHTML
Origins and evolution of HTML and XHTMLHowpk
 
Web I - 02 - XHTML Introduction
Web I - 02 - XHTML IntroductionWeb I - 02 - XHTML Introduction
Web I - 02 - XHTML IntroductionRandy Connolly
 
Vskills certified html designer Notes
Vskills certified html designer NotesVskills certified html designer Notes
Vskills certified html designer NotesVskills
 
Web design in 7 days by waqar
Web design in 7 days by waqarWeb design in 7 days by waqar
Web design in 7 days by waqarWaqar Chodhry
 
Vskills certified html5 developer Notes
Vskills certified html5 developer NotesVskills certified html5 developer Notes
Vskills certified html5 developer NotesVskills
 
Modular documentation in Structured FrameMaker
Modular documentation in Structured FrameMakerModular documentation in Structured FrameMaker
Modular documentation in Structured FrameMakerJang F.M. Graat
 

Tendances (20)

Web page concept final ppt
Web page concept  final pptWeb page concept  final ppt
Web page concept final ppt
 
Dynamic html (#1)
Dynamic  html (#1)Dynamic  html (#1)
Dynamic html (#1)
 
Html Tutorial
Html Tutorial Html Tutorial
Html Tutorial
 
What is html xml and xhtml
What is html xml and xhtmlWhat is html xml and xhtml
What is html xml and xhtml
 
Wp unit 1 (1)
Wp  unit 1 (1)Wp  unit 1 (1)
Wp unit 1 (1)
 
Html 5
Html 5Html 5
Html 5
 
HTML Basics 1 workshop
HTML Basics 1 workshopHTML Basics 1 workshop
HTML Basics 1 workshop
 
Html viva questions
Html viva questionsHtml viva questions
Html viva questions
 
Practical file on web technology(html)
Practical file on web technology(html)Practical file on web technology(html)
Practical file on web technology(html)
 
Vskills certified css designer Notes
Vskills certified css designer NotesVskills certified css designer Notes
Vskills certified css designer Notes
 
Origins and evolution of HTML and XHTML
Origins and evolution of HTML and XHTMLOrigins and evolution of HTML and XHTML
Origins and evolution of HTML and XHTML
 
Web I - 02 - XHTML Introduction
Web I - 02 - XHTML IntroductionWeb I - 02 - XHTML Introduction
Web I - 02 - XHTML Introduction
 
Vskills certified html designer Notes
Vskills certified html designer NotesVskills certified html designer Notes
Vskills certified html designer Notes
 
Web design in 7 days by waqar
Web design in 7 days by waqarWeb design in 7 days by waqar
Web design in 7 days by waqar
 
Html
HtmlHtml
Html
 
Vskills certified html5 developer Notes
Vskills certified html5 developer NotesVskills certified html5 developer Notes
Vskills certified html5 developer Notes
 
Design Tools Html Xhtml
Design Tools Html XhtmlDesign Tools Html Xhtml
Design Tools Html Xhtml
 
Modular documentation in Structured FrameMaker
Modular documentation in Structured FrameMakerModular documentation in Structured FrameMaker
Modular documentation in Structured FrameMaker
 
Introduction to Html
Introduction to HtmlIntroduction to Html
Introduction to Html
 
Iwt module 1
Iwt  module 1Iwt  module 1
Iwt module 1
 

En vedette

The Top 30 LotusScript Development Tips
The Top 30 LotusScript Development TipsThe Top 30 LotusScript Development Tips
The Top 30 LotusScript Development Tipsdominion
 
Learning to run
Learning to runLearning to run
Learning to rundominion
 
Lotusphere 2007AD302 WHAT’S NEW IN THE IBM LOTUS DOMINO WEB SERVER
Lotusphere 2007AD302 WHAT’S NEW IN THE IBM LOTUS DOMINO WEB SERVERLotusphere 2007AD302 WHAT’S NEW IN THE IBM LOTUS DOMINO WEB SERVER
Lotusphere 2007AD302 WHAT’S NEW IN THE IBM LOTUS DOMINO WEB SERVERdominion
 
Maximizing application performance
Maximizing application performanceMaximizing application performance
Maximizing application performancedominion
 
real world web services
real world web servicesreal world web services
real world web servicesdominion
 
Uklug2011.lotus.on.linux.report.technical.edition.v1.0
Uklug2011.lotus.on.linux.report.technical.edition.v1.0Uklug2011.lotus.on.linux.report.technical.edition.v1.0
Uklug2011.lotus.on.linux.report.technical.edition.v1.0dominion
 
Lotusphere 2007 BP312: Trap and Manage Your Errors Easily, Efficiently and Re...
Lotusphere 2007 BP312: Trap and Manage Your Errors Easily, Efficiently and Re...Lotusphere 2007 BP312: Trap and Manage Your Errors Easily, Efficiently and Re...
Lotusphere 2007 BP312: Trap and Manage Your Errors Easily, Efficiently and Re...dominion
 
Domino Vs Exchange App Dev
Domino Vs Exchange App DevDomino Vs Exchange App Dev
Domino Vs Exchange App Devdominion
 
JavaScript blast
JavaScript blastJavaScript blast
JavaScript blastdominion
 

En vedette (9)

The Top 30 LotusScript Development Tips
The Top 30 LotusScript Development TipsThe Top 30 LotusScript Development Tips
The Top 30 LotusScript Development Tips
 
Learning to run
Learning to runLearning to run
Learning to run
 
Lotusphere 2007AD302 WHAT’S NEW IN THE IBM LOTUS DOMINO WEB SERVER
Lotusphere 2007AD302 WHAT’S NEW IN THE IBM LOTUS DOMINO WEB SERVERLotusphere 2007AD302 WHAT’S NEW IN THE IBM LOTUS DOMINO WEB SERVER
Lotusphere 2007AD302 WHAT’S NEW IN THE IBM LOTUS DOMINO WEB SERVER
 
Maximizing application performance
Maximizing application performanceMaximizing application performance
Maximizing application performance
 
real world web services
real world web servicesreal world web services
real world web services
 
Uklug2011.lotus.on.linux.report.technical.edition.v1.0
Uklug2011.lotus.on.linux.report.technical.edition.v1.0Uklug2011.lotus.on.linux.report.technical.edition.v1.0
Uklug2011.lotus.on.linux.report.technical.edition.v1.0
 
Lotusphere 2007 BP312: Trap and Manage Your Errors Easily, Efficiently and Re...
Lotusphere 2007 BP312: Trap and Manage Your Errors Easily, Efficiently and Re...Lotusphere 2007 BP312: Trap and Manage Your Errors Easily, Efficiently and Re...
Lotusphere 2007 BP312: Trap and Manage Your Errors Easily, Efficiently and Re...
 
Domino Vs Exchange App Dev
Domino Vs Exchange App DevDomino Vs Exchange App Dev
Domino Vs Exchange App Dev
 
JavaScript blast
JavaScript blastJavaScript blast
JavaScript blast
 

Similaire à leverage dxl

Understanding the dom by Benedict Ayiko
Understanding the dom by Benedict AyikoUnderstanding the dom by Benedict Ayiko
Understanding the dom by Benedict AyikoDamalie Wasukira
 
Digital Marketing Company
Digital Marketing CompanyDigital Marketing Company
Digital Marketing CompanyPayal9675
 
Webcomponents TLV October 2014
Webcomponents TLV October 2014Webcomponents TLV October 2014
Webcomponents TLV October 2014Dmitry Bakaleinik
 
Document object model
Document object modelDocument object model
Document object modelAmit kumar
 
ILUG 2007 - Notes and Office Integration
ILUG 2007 - Notes and Office IntegrationILUG 2007 - Notes and Office Integration
ILUG 2007 - Notes and Office IntegrationJohn Head
 
How Browsers Work -By Tali Garsiel and Paul Irish
How Browsers Work -By Tali Garsiel and Paul IrishHow Browsers Work -By Tali Garsiel and Paul Irish
How Browsers Work -By Tali Garsiel and Paul IrishNagamurali Reddy
 
Rails Girls - Introduction to HTML & CSS
Rails Girls - Introduction to HTML & CSSRails Girls - Introduction to HTML & CSS
Rails Girls - Introduction to HTML & CSSTimo Herttua
 
Browsers. Magic is inside.
Browsers. Magic is inside.Browsers. Magic is inside.
Browsers. Magic is inside.Devexperts
 
COMPUTER-9-LESSON-2-Basic-HTML-Elements.pptx
COMPUTER-9-LESSON-2-Basic-HTML-Elements.pptxCOMPUTER-9-LESSON-2-Basic-HTML-Elements.pptx
COMPUTER-9-LESSON-2-Basic-HTML-Elements.pptxjoydesiar2
 
ITECH2106-6106 Lab01-HTML CSS Intro and Needs Analysis.pdf.docx
ITECH2106-6106 Lab01-HTML CSS Intro and Needs Analysis.pdf.docxITECH2106-6106 Lab01-HTML CSS Intro and Needs Analysis.pdf.docx
ITECH2106-6106 Lab01-HTML CSS Intro and Needs Analysis.pdf.docxchristiandean12115
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Modelchomas kandar
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Modelchomas kandar
 

Similaire à leverage dxl (20)

HTML literals, the JSX of the platform
HTML literals, the JSX of the platformHTML literals, the JSX of the platform
HTML literals, the JSX of the platform
 
Understanding the dom by Benedict Ayiko
Understanding the dom by Benedict AyikoUnderstanding the dom by Benedict Ayiko
Understanding the dom by Benedict Ayiko
 
Digital Marketing Company
Digital Marketing CompanyDigital Marketing Company
Digital Marketing Company
 
Webcomponents v2
Webcomponents v2Webcomponents v2
Webcomponents v2
 
WEB DEVELOPMENT
WEB DEVELOPMENTWEB DEVELOPMENT
WEB DEVELOPMENT
 
Webcomponents TLV October 2014
Webcomponents TLV October 2014Webcomponents TLV October 2014
Webcomponents TLV October 2014
 
Document object model
Document object modelDocument object model
Document object model
 
Web design in 7 days
Web design in 7 daysWeb design in 7 days
Web design in 7 days
 
ILUG 2007 - Notes and Office Integration
ILUG 2007 - Notes and Office IntegrationILUG 2007 - Notes and Office Integration
ILUG 2007 - Notes and Office Integration
 
HTML.pptx
HTML.pptxHTML.pptx
HTML.pptx
 
Dhtml
DhtmlDhtml
Dhtml
 
How Browsers Work -By Tali Garsiel and Paul Irish
How Browsers Work -By Tali Garsiel and Paul IrishHow Browsers Work -By Tali Garsiel and Paul Irish
How Browsers Work -By Tali Garsiel and Paul Irish
 
Rails Girls - Introduction to HTML & CSS
Rails Girls - Introduction to HTML & CSSRails Girls - Introduction to HTML & CSS
Rails Girls - Introduction to HTML & CSS
 
Browsers. Magic is inside.
Browsers. Magic is inside.Browsers. Magic is inside.
Browsers. Magic is inside.
 
Presentation html
Presentation   htmlPresentation   html
Presentation html
 
COMPUTER-9-LESSON-2-Basic-HTML-Elements.pptx
COMPUTER-9-LESSON-2-Basic-HTML-Elements.pptxCOMPUTER-9-LESSON-2-Basic-HTML-Elements.pptx
COMPUTER-9-LESSON-2-Basic-HTML-Elements.pptx
 
ITECH2106-6106 Lab01-HTML CSS Intro and Needs Analysis.pdf.docx
ITECH2106-6106 Lab01-HTML CSS Intro and Needs Analysis.pdf.docxITECH2106-6106 Lab01-HTML CSS Intro and Needs Analysis.pdf.docx
ITECH2106-6106 Lab01-HTML CSS Intro and Needs Analysis.pdf.docx
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
Html Concept
Html ConceptHtml Concept
Html Concept
 

Plus de dominion

What is a itil and how does it relate to your collaborative environment uklug
What is a itil and how does it relate to your collaborative environment   uklugWhat is a itil and how does it relate to your collaborative environment   uklug
What is a itil and how does it relate to your collaborative environment uklugdominion
 
iOS enterprise
iOS enterpriseiOS enterprise
iOS enterprisedominion
 
cloud session uklug
cloud session uklugcloud session uklug
cloud session uklugdominion
 
Uklug 2011 administrator development synergy
Uklug 2011 administrator development synergyUklug 2011 administrator development synergy
Uklug 2011 administrator development synergydominion
 
Uklug 2011 client management
Uklug 2011 client managementUklug 2011 client management
Uklug 2011 client managementdominion
 
Populating your domino directory or any domino database with tivoli directory...
Populating your domino directory or any domino database with tivoli directory...Populating your domino directory or any domino database with tivoli directory...
Populating your domino directory or any domino database with tivoli directory...dominion
 
Uklug2011 Know your Notes
Uklug2011 Know your NotesUklug2011 Know your Notes
Uklug2011 Know your Notesdominion
 
Taking themes to the next level
Taking themes to the next levelTaking themes to the next level
Taking themes to the next leveldominion
 
Supersize me
Supersize meSupersize me
Supersize medominion
 
Aussie outback
Aussie outbackAussie outback
Aussie outbackdominion
 
Implementing xpages extension library
Implementing xpages extension libraryImplementing xpages extension library
Implementing xpages extension librarydominion
 
Abb presentation uklug
Abb presentation uklugAbb presentation uklug
Abb presentation uklugdominion
 
Domino testing presentation
Domino testing presentationDomino testing presentation
Domino testing presentationdominion
 
Composite applications tutorial
Composite applications tutorialComposite applications tutorial
Composite applications tutorialdominion
 
Error handling in XPages
Error handling in XPagesError handling in XPages
Error handling in XPagesdominion
 
wcm domino
wcm dominowcm domino
wcm dominodominion
 
Ajax in domino web-anwendungen - der nächste schritt
Ajax in domino web-anwendungen - der nächste schrittAjax in domino web-anwendungen - der nächste schritt
Ajax in domino web-anwendungen - der nächste schrittdominion
 
lotus notes r851 -training
lotus notes r851 -traininglotus notes r851 -training
lotus notes r851 -trainingdominion
 
Inside notes
Inside notesInside notes
Inside notesdominion
 

Plus de dominion (20)

What is a itil and how does it relate to your collaborative environment uklug
What is a itil and how does it relate to your collaborative environment   uklugWhat is a itil and how does it relate to your collaborative environment   uklug
What is a itil and how does it relate to your collaborative environment uklug
 
iOS enterprise
iOS enterpriseiOS enterprise
iOS enterprise
 
cloud session uklug
cloud session uklugcloud session uklug
cloud session uklug
 
Uklug 2011 administrator development synergy
Uklug 2011 administrator development synergyUklug 2011 administrator development synergy
Uklug 2011 administrator development synergy
 
Uklug 2011 client management
Uklug 2011 client managementUklug 2011 client management
Uklug 2011 client management
 
Populating your domino directory or any domino database with tivoli directory...
Populating your domino directory or any domino database with tivoli directory...Populating your domino directory or any domino database with tivoli directory...
Populating your domino directory or any domino database with tivoli directory...
 
Uklug2011 Know your Notes
Uklug2011 Know your NotesUklug2011 Know your Notes
Uklug2011 Know your Notes
 
Quickr
QuickrQuickr
Quickr
 
Taking themes to the next level
Taking themes to the next levelTaking themes to the next level
Taking themes to the next level
 
Supersize me
Supersize meSupersize me
Supersize me
 
Aussie outback
Aussie outbackAussie outback
Aussie outback
 
Implementing xpages extension library
Implementing xpages extension libraryImplementing xpages extension library
Implementing xpages extension library
 
Abb presentation uklug
Abb presentation uklugAbb presentation uklug
Abb presentation uklug
 
Domino testing presentation
Domino testing presentationDomino testing presentation
Domino testing presentation
 
Composite applications tutorial
Composite applications tutorialComposite applications tutorial
Composite applications tutorial
 
Error handling in XPages
Error handling in XPagesError handling in XPages
Error handling in XPages
 
wcm domino
wcm dominowcm domino
wcm domino
 
Ajax in domino web-anwendungen - der nächste schritt
Ajax in domino web-anwendungen - der nächste schrittAjax in domino web-anwendungen - der nächste schritt
Ajax in domino web-anwendungen - der nächste schritt
 
lotus notes r851 -training
lotus notes r851 -traininglotus notes r851 -training
lotus notes r851 -training
 
Inside notes
Inside notesInside notes
Inside notes
 

Dernier

Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Dernier (20)

Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

leverage dxl

  • 1. Leverage DXL to Overcome Web Browser Rich Text Limitations Lance Spellman Workflow Studios
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. Demonstration: How Domino Handles Rich Text on the Web Domino default rendering of Rich Text to the Web
  • 8. Rich Text Input with the Notes Client Image floats right of text 2 nd row starts immediately Table borders of varying thickness Cell padding Picture caption
  • 9. Rich Text Rendering by Domino to Browser Table rows are equally spaced Table borders are all visible and set to ridge style Picture caption? Paragraph wraps incorrectly Cell padding is NOT observed
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17. Browser Rendering of Content Stored as HTML/MIME Attachment has moved out of the table Wrap properties for picture are completely lost Table size is no longer fixed width, but has been converted to page width
  • 18.
  • 19. Demonstration: Saving Rich Text Content as MIME and Viewing It Saving RT content as MIME/HTML
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. Rich Text Transformed to Correct HTML on Post Save Notes Document Output DXL Transform DXL to HTML Display to Web Display to Web Rich Text Block Post-Save Event HTML Block
  • 27.
  • 28.
  • 29.
  • 30. Demonstration: DXL Process — Rich Text to DXL to HTML Overview of the process for RT to DXL to HTML
  • 31.
  • 32.
  • 33. Code Example for DXL Export try { … DxlExporter dxl = session.createDxlExporter(); … // handle inline images in the Rich Text dxl.setConvertNotesBitmapsToGIF(true); // turn DOCTYPE output off because DOM processor // can't find the DOCTYPE declaration file and errors dxl.setOutputDOCTYPE(false); String docDxl = dxl.exportDxl(doc); Exports document as XML to a string Changes output of inline pictures from Notes bitmap to GIF
  • 34.
  • 35. Identifying the Rich Text Items in DXL Output <item name='MIME_Version'> <text>1.0</text> </item> <item name='body'><richtext> <pardef id='1' align='center' leftmargin='1in'/> <par def='1'><run> <font size='18pt' style='bold'/> Rich Text Is Totally WICKED! </run> </par>… Text Item vs. Rich Text Item
  • 36.
  • 37.
  • 38. PAR and PARDEF Equivalencies in HTML/CSS PARDEF = CSS Selector PARDEF ID attribute = CSS Class PAR = HTML <p> PAR DEF attribute = HTML <p class=“”>
  • 39.
  • 40.
  • 41. DXL Output with setConvertNotesBitmapsToGIF( false ); <picture width='160px' height='135px' scaledheight='1.4063in' scaledwidth='1.6667in' align='right'> <notesbitmap> </notesbitmap> <caption>Mikkel Heisterberg</caption> </picture> lQAmAAAAAAAAAAAAAAABAAAAAAAAACsALwAIAAEACAABADAAAgCWAJUEAAAAAAAAAAAAAC8AgwTN AM8EAR3OAM0ABQQMDgwOwgzCD8IMww4DJyMWzQDNAAEExA7FDMQOBCcjGBbMAMUAAQvCJsMLyBXH FAIeDsIYAhkcywDFAAImFMMawhPJB8USAgUMwhgDAxkcygDFAAEmwhoCEwfCCAIVDcMIBRoNCAAI whPCB8IIAxUNCMISBQgSCAELxAkFBS0ZGA/CBgMPGRbHAMUAAgsTwwcBCMISAgcIwhIDCA0Iwg3E … Base64 encoded content
  • 42. DXL Output with setConvertNotesBitmapsToGIF( true ); <picture width='160px' height='135px' scaledheight='1.4063in' scaledwidth='1.6667in' align='right'> <gif> </gif> <caption>Mikkel Heisterberg</caption> </picture> R0lGODlhoACHAOcAAPD4+P///xgYICAgKLjAwKiwuBAYGBAQGBggIOjw+BAQECgoMAgQEKCwsKiw sCAoKLC4wCAoMDA4QPDw+HB4gDhASCgwMCgwOLC4uOj4+AgIEBggKBgYGDA4OLjAyAgICEBIUGhw eDAwODhAQKCosEBISEhQWFhgaCAgIDg4QGBocFBYYCgoKDAoKEhQUDgwKHiAiCggIGh4gOjw8EBA SEhIUFBYWKi4uFhgYAAAADAoILDAwCgoIJB4aPDw8AAICDAwMKCwuDg4OHCAiBAYILDAyAAACKCo… Base64 encoded content of GIF that can be saved to a file
  • 43.
  • 44. DXL for File Attachments <attachmentref name='test.pdf‘ displayname='test.pdf'> <picture height='47px' width='43px'> <notesbitmap> lQAmAAAAAAAAAAAAAAABAAAAAAAAACsALwAIAAEACAABADAAAgCWAJUEAAAAAAAAAAAAAC8AgwTN AM8EAR3OAM0ABQQMDgwOwgzCD8IMww4DJyMWzQDNAAEExA7FDMQOBCcjGBbMAMUAAQvCJsMLyBXH FAIeDsIYAhkcywDFAAImFMMawhPJB8USAgUMwhgDAxkcygDFAAEmwhoCEwfCCAIVDcMIBRoNCAAI… </notesbitmap > </picture> </attachmentref> <picture height='47px' width='43px'> <notesbitmap> lQAmAAAAAAAAAAAAAAABAAAAAAAAACsALwAIAAEACAABADAAAgCWAJUEAAAAAAAAAAAAAC8AgwTN AM8EAR3OAM0ABQQMDgwOwgzCD8IMww4DJyMWzQDNAAEExA7FDMQOBCcjGBbMAMUAAQvCJsMLyBXH FAIeDsIYAhkcywDFAAImFMMawhPJB8USAgUMwhgDAxkcygDFAAEmwhoCEwfCCAIVDcMIBRoNCAAI… </notesbitmap > </picture> The attachment filename Picture element is just the icon used to display the file attachment. It is not the file attachment itself.
  • 45. DXL for File Attachments (cont.) <item name='$FILE' summary='true' sign='true' seal='true'> <object> <file hosttype='msdos' compression='none' flags='storedindoc' encoding='none' name='test.pdf'> <created> <datetime>20051111T180304,3906</datetime> </created> <modified> <datetime>20051111T180304,39-06</datetime> </modified> <filedata> JVBERi0xLjQNCiXDpMO8w7bDnw0KMiAwIG9iag0KPDwgL0xlbmd0aCAzIDAgUg0KICAgL0ZpbHRl… The attachment filename Base64 encoded data of the attachment The file element
  • 46.
  • 47.
  • 48.
  • 49. Code for Obtaining a DOM Document from DXL String private org.w3c.dom.Document getDOMDoc(String dxl) { try { // Get Document Builder Factory DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); … // Obtain a document builder object DocumentBuilder builder = factory.newDocumentBuilder(); builder.setErrorHandler(new DefaultHandler()); // Parse the document and return it StringReader reader = new StringReader(dxl); InputSource source = new InputSource(reader); return builder.parse(source); … DocumentBuilder parses a String InputSource to create a DOM Document
  • 50.
  • 51.
  • 52. Isolating the Inline Images and Saving Them to Files Element element = domDoc.getDocumentElement(); // find all the inline images in the richtext fields get the picture nodes NodeList pictureNodes = element.getElementsByTagName(&quot;picture&quot;); int numOfPictures = pictureNodes.getLength(); … for (int k=0; k<numOfPictures; k++) { NodeList picChildren = pictureNodes.item(k).getChildNodes(); // gif tags int numOfNodes = picChildren.getLength(); for (int i=0; i<numOfNodes; i++) { // loop through the <gif> tags Node binaryNode = numOfNodes.item(i).getFirstChild(); String base64Stream = binaryNode.getNodeValue(); … String fullfilepath = filename; // filename set earlier in code Base64.decodeToFile(base64Stream, fullfilepath); } } Collects all the picture elements Gets the Base64 data for the picture as a String Decodes and saves file to filesystem
  • 53.
  • 54.
  • 55.
  • 56. Selecting the Rich Text Items to Apply Template Rules <xsl:template match=&quot;d:document&quot;> <xsl:apply-templates select=&quot;d:item&quot;/> </xsl:template> <xsl:template match=&quot;d:item&quot;> <xsl:apply-templates select=&quot;d:richtext&quot;/> </xsl:template> <xsl:template match=&quot;d:richtext&quot;> <xsl:apply-templates/> </xsl:template> Starts with document, looks for items, selects only Rich Text items, then applies remaining templates to Rich Text items only
  • 57. Sample Template for Handling Table Elements <xsl:template match=&quot;d:table&quot;> <table width=&quot;100%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;> <xsl:attribute name=&quot;width&quot;> <xsl:if test=&quot;@widthtype='fitmargins'&quot;>100%</xsl:if> </xsl:attribute> <xsl:attribute name=&quot;style&quot;>border-collapse: collapse; <xsl:if test=&quot;string(d:border/@style)&quot;> border-style: <xsl:choose> <xsl:when test=&quot;d:border/@style='dot'&quot;>dotted</xsl:when> <xsl:when test=&quot;d:border/@style='dash'&quot;>dashed</xsl:when> <xsl:otherwise><xsl:value-of select=&quot;d:border/@style&quot;/></xsl:otherwise> </xsl:choose>; </xsl:if> … </xsl:template> Template illustrates getting the style attribute from the DXL and converting that to CSS selectors
  • 58. Implementing the XSL Transformation in Code XSLProcessor xp = new XSLProcessor(new XML4JLiaison4dom()); StringReader xmlSource2 = new StringReader(docDxl); StringReader xslSource2 = new StringReader(xslProfile.getItemValueString(&quot;RTXSL&quot;)); StringWriter sw = new StringWriter(); XSLTInputSource xs = new XSLTInputSource(xmlSource2); XSLTInputSource xt = new XSLTInputSource(xslSource2); XSLTResultTarget tout = new XSLTResultTarget(sw); xp.process(xs, xt, tout); RichTextItem rt = doc.createRichTextItem(&quot;HTMLTransform&quot;); rt.appendText(sw.toString()); XSL is retrieved from a text field in a Notes document The DXL source DXL is transformed to HTML and saved to the document
  • 59. Demonstration: Live Debug Session for DXL2HTML.xsl Visual Studio Debugger for DXL2HTML.xsl
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66. Your Turn! How to Contact Me: Lance Spellman [email_address]