Download presentation
Presentation is loading. Please wait.
1
Specifying output attributes in XSL
2
Motivating example Suppose you have this XML document: fred http://fred.com tom http://tom.com
3
Motivating example Suppose you have this XML document: fred http://fred.com tom http://tom.com Now, suppose you want to generate this: People fred tom
4
A first effort Source document: fred http://fred.com tom http://tom.com Intended output People fred tom A tentative XSL file <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> People ’ >
5
This approach will not work
6
Using the xsl:attribute element in xsl2.xsl People
7
This works
8
You can do this for any attribute People alert('hello'); People
9
After the page is loaded
10
When the mouse is held over the h1 heading
11
xsl:attribute elements must come first This will not work –Because the xsl:attribute is not first People People alert('hello');
12
Alternative approach, using escape braces People '>
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.