Summit 2001, Orlando Desert, California
Bob Hughes and Laura Voss-Allen,
California State University, Hayward rhughes@csuhayward.edu
, lvoss-allen@csuhayward.edu
NORCAL FUSE: http://www.csuhayward.edu/FOCUS/ncalibug.htm
Custom XML Content and Data Generation with Core FOCUS
HTML and XML Integration
Data Separation and Binding
True Paging with JavaScript
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
2
XML = Extensible Markup Language
Per W3C – “XML is a subset of SGML…XML has been designed for ease of use…with both SGML and HTML.”
Unlike HTML, XML does not have a fixed set of predefined elements. Instead XML has only a very basic syntax allowing the XML author to create elements and name them.
XML Syntax is flexible but strict (not forgiving like HTML)
XML is not a replacement for HTML, it is complementary
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
3
(cont’d)
XML documents are structured in a
Treelike hierarchy
Element names can and should be descriptive
Elements are nested within other elements
Can be used to describe chapters in a
book, database fields, etc…
Supports HRMML, CML, MathML, GedML,
MusicMl and more…
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
4
Document must have only one toplevel/root element
Elements must be properly nested
Elements must have start and end tags and tag names must match(case sensitive)
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
5
Easy to learn – choose applications wisely
- may not benefit much, depending on app
Separation of data from formatting code i.e. "data islands" a big benefit!
Paging buttons + other
HTML/Java/JavaScript/VBScript Integration an advantage
hrefs not bindable - disadvantage
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
6
Uses Minimum Amount Of XML Code To
Convert Focus Report To XML Format
Unlike HTML Minimum Effort, Results
Produces only Rough Looking Tree Based
Expandable View
Requires Very Little Effort
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
7
XML Declaration
Document/Root Element
Elements Nested With
Document
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
8
Simple XML Layout
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
9
Style Sheet Linking
CSS (standard HTML Style sheet language)
XSL,XSLT (newer, more powerful XML oriented)
Data Binding**
Link from HTML Page
Bind standard HTML Elements
e.g. SPAN, TABLE
Scripting
After linking from HTML Page use JavaScript,
VBScript etc. for access and manipulation
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
10
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
11
CSS File Reference
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
12
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
13
XSL=Extensible Stylesheet Language
Linked to an XML document like CSS
XSL provides more power
Present data in any order or arrangement
Freely modify or add information
Sort and Filter XML Data
May include scripts
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
14
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
15
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
16
Used for displaying XML Data from within a conventional HTML page.
Links HTML elements to XML Data File elements
Works only with symmetric XML
Documents such as a database with records and fields
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
17
Use DEFINE Facility For XML and HTML
Tag Creation
Incorporate XML and HTML Tags into
Focexec for XML and HTML Files
Save XML and HTML Files via WP Hold
Use FTP Dynamic Focexec to move to any
IP address (Web Server, etc.)
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
18
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
19
Tables Used For Data Presentation
Font Sizing and Color Control
XML Links added to HTML Page
HTML and XML Files Generated
Javascript Contols Used For Paging against Bound XML Data File
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
20
HTML with XML Data Binding(1)
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
21
HTML with XML Data Binding(2)
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
22
HTML with XML Data Binding(3)
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
23
HTML with XML Data Binding(4)
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
24
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
25
HTML W/ All Data Embedded
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
26
HTML with XML Data Binding
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
27
MS IE v5.5 (built-in parser)
MSXML v4.0
MS XML Validation Tool (command line)
Xmlint.exe @www.microsoft.com/xml
Netscape v6.01 (built-in parser)
Online Brown University XML Validator
Wide Variety of XML Parsers/Validators written in Java ‘on the web’
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
28
XML Parsers-MS XML Validation
Tool (command line)
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
29
Element Tag Name
Mismatch Error Found
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
30
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
31
http://www.stg.brown.edu/service/xmlvalid/
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
32
http://www.stg.brown.edu/service/xmlvalid/
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
33
Books
MS Press Step by Step XML
Addison-Wesley XSLT Working with XML and HTML
Web Sites
www.microsoft.com/xml
www.w3c.org/xml
www.xml.com
www.xml.org
Presentation Update
www.csuhayward.edu/FOCUS/summit01
Summit 2001 - Bob Hughes & Laura Voss-Allen, Cal State Univ., Hayward
34