Presentation is loading. Please wait.

Presentation is loading. Please wait.

Using XML, XSLT, and CSS in a Digital Library Rendering Using XSLT and CSS Mathematics Rendering Thomas Habing ASIS Annual Meeting 2000.

Similar presentations


Presentation on theme: "Using XML, XSLT, and CSS in a Digital Library Rendering Using XSLT and CSS Mathematics Rendering Thomas Habing ASIS Annual Meeting 2000."— Presentation transcript:

1 Using XML, XSLT, and CSS in a Digital Library Rendering Using XSLT and CSS Mathematics Rendering Thomas Habing thabing@uiuc.edu ASIS Annual Meeting 2000

2 15 November 2000 ASIS Annual Meeting 20002 Evolution of Rendering zFull-text y‘96 Plugins: Adobe Acrobat (PDF) or Softquad Panorma (SGML) y‘99 Custom Server-side Converter to DHTML y‘00 Standards-based XSLT Converter to DHTML zMetadata y‘96 OpenText Livelink for short & long citations y‘98 Merged with full-text y‘99 XSLT for long citations y‘00 Migrating to XSLT for long & short citations xIncluding special characters, formatting, and math

3 15 November 2000 ASIS Annual Meeting 20003 XSLT Where Should It Happen zClient-side yIE5+ only xNot Netscape 6 or Mozilla (yet) xIE5 not yet fully compliant w/ XSLT and XPath standard yCan reduce the load on your servers yBut performance on low-end clients can be BAD zServer-side yPerformance could be a problem on busy servers, serving large, complex documents yMore control & flexibility over the conversion (metamerge) zOffline Preconversion yBest performance yNot best for dynamic documents (metamerge)

4 15 November 2000 ASIS Annual Meeting 20004 Transform Source XML into HTML or ‘Renderable’ XML? zOur current choice is HTML (XHTML) yMany browsers do not support XML at all yEven of the browsers that do support XML, they still support HTML better xImages, Linking, Tables, CSS, etc. xAs there is more support for additional XML standards, such as XLink, this may not always be the case xEven for ‘renderable’ XML, we still need to revert to embedded HTML for some constructs yEliminates the need to for dual code maintenance

5 15 November 2000 ASIS Annual Meeting 20005 Converting XML to HTML  Simple one-to-one conversions: becomes yspan.sect {display:block;margin-left:2em}  Attribute based conversions: becomes yspan.emph_1 {font-style:italic}  Generated text, such as punctuation: Tom Tim Bob becomes Tom, Tim, Bob.  Rearranged children: Habing Tom becomes Tom Habing

6 15 November 2000 ASIS Annual Meeting 20006 Converting XML to HTML (cont.)  Some elements are converted into HTML elements other than or  Figures are converted to tags.  Internal links with ID and IDREF attributes are usually converted into HTML anchor tags.  Table elements are converted into corresponding HTML,, or tags. z‘Real’ DTDs require some fairly complex processing. ySo far XSLT seems to be able to handle nearly every case we have come across yHowever, some cases have required JScript extensions to XSLT

7 15 November 2000 ASIS Annual Meeting 20007 Alternates to XSLT zCustom Parser (our previous approach) zSAX - Simple API for XML yPerformance can be better for large XML files yStreaming parser - entire document is not loaded into memory as with XSLT yNot as flexible as XSLT xMore difficult to rearrange output yNot a W3C standard

8 15 November 2000 ASIS Annual Meeting 20008 Rendering Mathematics zSGML ISO 12083 or variant yConvert to DHTML for native browser rendering yConvert to an Image yConvert to MathML and... xRender as above, but only one target xRender with a Plugin (techexplorer, WebEQ) xNative browser support (Mozilla or Amaya) zTeX yConvert TeX to Image (tex->dvi->ps->gif) yRender with a Plugin (techexplorer)

9 15 November 2000 ASIS Annual Meeting 20009 Rendering SGML Math as DHTML zXSLT Dynamically Converts Markup to HTML with: yCSS Positioning yJavaScript yDynamic Properties  Center Vertically: top:expression((this.offsetHeight-8)/2+'px');  Set the width: width:expression(Math.max( this.parentNode.children(1).offsetWidth, this.offsetWidth)+'px'); yAttached Behaviors xbehavior:url(center.htc); zCurrently only works with Microsoft IE 5+

10 15 November 2000 ASIS Annual Meeting 200010 Math Example Using DHTML span.fr { position:relative; width:1px; margin-top:expression(-(this.children(1).offsetHeight-8) +'px’); top:expression((this.children(1).offsetHeight-8) +'px’);} div.nu { border-bottom:1px solid black; text-align:center; behavior:url(nu.htc);} div.de { text-align:center; behavior:url(de.htc);} 1 2

11 15 November 2000 ASIS Annual Meeting 200011 Convert SGML Math to Image zNeed to support less capable browsers zHow to convert? yDisplay document in Internet Explore as DHTML yHide irrelevant information leaving only the formula yResize the display window to fit in the formula yTrim blank and check if there is unknown symbol yCapture the display window and convert the image to GIF/JPEG format. zProcess is fully automated (Visual Basic)

12 15 November 2000 ASIS Annual Meeting 200012 Rendering MathML zOriginal PDF from publisher: zCustom DHTML: zMozilla M18: zTechexplorer (Netscape): zAmaya:

13 15 November 2000 ASIS Annual Meeting 200013 Rendering Issues zSpecial Character Support ySTIX yUnicode yPublisher Specific Entities zMathematics yBetter Native Browser Support for MathML yConversion of Legacy Math to MathML


Download ppt "Using XML, XSLT, and CSS in a Digital Library Rendering Using XSLT and CSS Mathematics Rendering Thomas Habing ASIS Annual Meeting 2000."

Similar presentations


Ads by Google