Upconversion using XSLT 2.0 - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Upconversion using XSLT 2.0

Description:

xsl:matching-substring xsl:non-matching-substring xsl:value-of select='.'/ /xsl:non-matching-substring /xsl:analyze-string 7 xsl:for-each-group example ... – PowerPoint PPT presentation

Number of Views:128
Avg rating:3.0/5.0
Slides: 10
Provided by: sof61
Category:

less

Transcript and Presenter's Notes

Title: Upconversion using XSLT 2.0


1
Up-conversionusing XSLT 2.0
  • Michael Kay
  • XML 2004
  • 16 November 2004

2
A Plug
3
Up-Conversion
  • What is it?
  • XSLT 2.0 Facilities
  • An example

4
A Definition
Up-conversion detects implicit structure and
converts it into explicit markup
5
Relevant Facilities in XSLT 2.0
  • unparsed-text() function
  • reads plain text files
  • analyze-string
  • regex-based string manipulation
  • for-each-group
  • turns flat element sequences into nested tree
    structures
  • result tree validation
  • ensures that the result matches the target schema

6
ltxslanalyze-stringgt example
ltxslanalyze-string selectabstract
regex\.?\gt
ltxslmatching-substringgt ltcitationgtltxslvalu
e-of select./gtlt/citationgt
lt/xslmatching-substringgt ltxslnon-matching-sub
stringgt ltxslvalue-of select./gt
lt/xslnon-matching-substringgt lt/xslanalyze-string
gt
7
ltxslfor-each-groupgt example
ltxslfor-each-group selectemployee
group-bydepartmentgt
lth2gtltxslvalue-of selectcurrent-grouping-key()/
gtlt/h2gt ltxslfor-each selectcurrent-group()gt
lth3gtEmployee ltxslvalue-of
selectname/gtlt/h3gt lttablegt
ltxslfor-each select except (name,
department) gt lttrgt
lttdgtltxslvalue-of selectname()/gtlt/tdgt
lttdgtltxslvalue-of select./gtlt/tdgt
lt/trgt lt/xslfor-eachgt lt/tablegt
lt/xslfor-eachgt lt/xslfor-each-groupgt
8
A Case Study
XHTML
GEDCOM5.5legacydata
GEDCOM5.5encoded in XML
GEDCOM6.0
PDF
c
GEDCOM6.0Schema
9
Summary
  • Up-conversion converts implicit structure to
    explicit markup
  • Supported by
  • unparsed-text()
  • xslanalyze-string
  • xslfor-each-group
  • result tree validation
  • Extends the reach of XSLT as a tool
Write a Comment
User Comments (0)
About PowerShow.com