Interactive, dynamic Scalable Vector Graphics
|
|
|
- Lucy Harris
- 10 years ago
- Views:
Transcription
1 Interactive, dynamic Scalable Vector Graphics Table of Contents If you're viewing this document online, you can click any of the topics below to link directly to that section. 1. Introduction Overview Creating the SVG Document Viewing floor plans Manipulating an SVG image XSLT and SVG Summary. 38 Interactive, dynamic Scalable Vector Graphics Page 1 of 39
2 Section 1. Introduction Should I take this tutorial? This tutorial is for developers who want to use Scalable Vector Graphics (SVG) to create interactive SVG graphics and to produce such SVG images from an XML file using XSLT. It discusses the use of ECMAScript (JavaScript) to enable users to interact with and change an existing SVG image in real time without reloading the browser page. It also demonstrates linking from an SVG element. Readers should have read the Introduction to SVG tutorial here on developerworks, or have some similar understanding of SVG fundamentals. Some previous knowledge of JavaScript and XSLT is also advantageous. What is this tutorial about? SVG is a powerful visual tool ideally suited to display data held as XML. This tutorial demonstrates the use of SVG to display a simplified interactive floor plan. JavaScript provides interactivity in SVG images in this tutorial, enabling visitors to the Web page to zoom in and out of the image, scroll between rooms, and perform additional functions. The tutorial covers: Creating the initial SVG image Zooming in and out of the image Using JavaScript to scroll the image from room to room Deleting SVG elements Adding new SVG elements Linking from an SVG element to another document Generating the SVG document dynamically using XSLT Tools The tutorial shows you how to build HTML, SVG, and XSLT documents. To follow along you need a text editor, an SVG viewer, and an XSLT engine: A plain text editor is all you need to create SVG files. XML-enabled text editors which can check for well-formedness and/or validity are very useful for detecting coding errors but are not necessary. An SVG viewer: The most widely used SVG viewer at the time of this writing is Adobe's SVG Viewer, version 3.0, which is available for free at Other SVG viewers are listed in Page 2 of 39 Interactive, dynamic Scalable Vector Graphics
3 the Resources on page 38. A browser: The Adobe viewer works best with Microsoft Internet Explorer 5.x and above, and also with Netscape Navigator 4.x and above. The Adobe SVG Viewer version 3 does not work reliably with Mozilla 1.0 and above, particularly when scripting code is present. An XSLT processor: The Saxon XSLT processor is used for this example. It can be downloaded from About the author Andrew Watt is an independent consultant with an interest and expertise in XML technologies. He wrote the world's first book on SVG, Designing SVG Web Graphics (New Riders), and was lead author for SVG Unleashed (Sams Publishing) as well as being an author of several books on XML and Web technologies. He has two all-svg Web sites at and which demonstrate how SVG can be used to create useful sites. Interactive, dynamic Scalable Vector Graphics Page 3 of 39
4 Section 2. Overview The goal This tutorial centers on the creation of a simple floor plan that a user can visit in order to determine the type and size of rooms for a proposed office building. It starts with an HTML document that includes an SVG image representing a simplified floor plan of one floor of the building. The SVG image includes three rooms -- Rooms 101, 102, and of which only Room 102 is visible when the document first loads. To see the entire floor plan, the user can zoom in and out to determine the overall scale. The HTML document also provides controls to enable scrolling, under user control, between the three rooms on the first floor. Additional controls allow the user to change the character of a selected room -- in this example from a Standard Office to an Executive Office and back again. Finally, the user has the ability to enlarge or shrink the size of a particular room. Each room on the first floor also contains a link to a plan for the second floor of the same building, which has the same functionality and links back to the first floor. The functionality of the floor plans uses ECMAScript (JavaScript) code to provide interactivity. The code demonstrates several aspects of using ECMAScript from an HTML page to control the elements of an SVG image in that page. The final part of the tutorial looks at using XSLT code to transform a source XML document into the SVG image of the first floor floor plan. Next I'll show you the component parts of this simple application. The component parts of the application The overall application involves the following pieces: The XML source document: This document defines the initial characteristics of the SVG image. It can be a static XML file (as it will be here), or it could just as easily be XML generated out of a database. The XSLT stylesheet: Dynamically turning an XML document of, say, potential floor plans into SVG images of those plans can be easily accomplished using XSLT transformations. The application can also use different stylesheets to generate different presentations. The SVG image: This is the image that will ultimately be generated, and provides the display the user sees. An XML document itself, it can be manipulated using XML programming techniques such a the Document Object Model (DOM). The HTML container document: To display an SVG image directly in a browser, you generally need an HTML page that embeds that image within it. In this case, the HTML document also contains the Javascript code that manipulates that SVG image. Page 4 of 39 Interactive, dynamic Scalable Vector Graphics
5 I'll start by looking at the SVG document itself. Interactive, dynamic Scalable Vector Graphics Page 5 of 39
6 Section 3. Creating the SVG Document The SVG document structure This tutorial uses two SVG images -- one to represent part of the first floor of an office building and the second SVG image to represent the corresponding rooms on the second floor. Each SVG image is nested inside an HTML page. I'll start by manually creating the first floor image so I have something to work with. An SVG image starts with an svg root element: <?xml version='1.0'?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" " <svg xmlns=" width="1200px" height="250px" viewbox=" " id="roomssvg"> Notice that the namespace declaration specifies that SVG elements are in the SVG namespace and are to be written with no namespace prefix. The overall SVG image is 1200 pixels wide and 250 pixels high, with a viewport of 400 pixels wide by 250 pixels high, as shown by the viewbox attribute. The first and second values of the viewbox attribute indicate that the top left of the viewport is at (0,0). The third and fourth values in the viewbox attribute indicate that the bottom right of the viewport is located at (400,250). Any part of the image not within this viewport is invisible to the user. Each room is 400 pixels wide by 250 pixels high, so only one room fits into the viewport at the outset. Again, the viewport is simply the part of the SVG image that is visible. Later in the tutorial, I'll use ECMAScript to manipulate the contents of the viewbox attribute causing the SVG image to scroll to the left or right. Each of three rooms starts at 400 pixels wide and 250 pixels high, representing a room 40 feet wide and 25 feet deep. Next I'll add those rooms. The rooms Because this is a tutorial on SVG and not interior design, I'll just represent each room as an appropriately sized rectangle. The SVG code for each of the three rooms on the first floor -- rooms 101, 102, and follows the same basic pattern: <?xml version='1.0'?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" Page 6 of 39 Interactive, dynamic Scalable Vector Graphics
7 " <svg xmlns=" width="1200px" height="250px" viewbox=" " id="roomssvg"> <svg id="room101" width="400px" height="250px" x="0px" y="0px"> <rect id="room101rect" width="100%" height="100%" fill="#ccccff" stroke="black" stroke-width="5"/> <text id="room101label" font-size="24pt" x="55px" y="100px" fill="black">room 101</text> <text id="room101type" font-size="24pt" x="55px" y="150px" fill="black">standard office</text> <svg id="room102" width="400px" height="250px" x="400px" y="0px"> <svg id="room103" width="400px" height="250px" x="800px" y="0px"> The code for each room is contained in a nested svg element, with the x and y attributes determining the position of that nested svg element. Now remember, the image is 1200 pixels wide but the viewport is only 400 pixels wide. Next I'll center the image in the viewport. Centering the image Notice that the initial creation of Room 101 shows that it should appear at the top left corner of the viewport: <svg id="room101" width="400px" height="250px" x="0px" y="0px"> Left as-is, this would mean Room 101 fills the viewport when the page is loaded, but instead I want Room 102. To do this, I need to create a container and move all of the rooms 400 pixels to the left: <?xml version='1.0'?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" " <svg xmlns=" width="1200px" height="250px" viewbox=" " id="roomssvg"> <g id="mover" transform="translate(-400,0)"> <svg id="room101" width="400px" height="250px" x="0px" y="0px"> <rect id="room101rect" width="100%" height="100%" fill="#ccccff" stroke="black" stroke-width="5"/> <text id="room101label" font-size="24pt" x="55px" y="100px" fill="black">room 101</text> <text id="room101type" font-size="24pt" x="55px" y="150px" fill="black">standard office</text> Interactive, dynamic Scalable Vector Graphics Page 7 of 39
8 <svg id="room102" width="400px" height="250px" x="400px" y="0px"> <rect id="room102rect" x="0" y="0" width="100%" height="100%" fill="#ccffcc" stroke="black" stroke-width="5"/> <text id="room102label" font-size="24pt" x="55px" y="100px" fill="black">room 102</text> <text id="room102type" font-size="24pt" x="55px" y="150px" fill="black">standard office</text> <svg id="room103" width="400px" height="250px" x="800px" y="0px"> <rect id="room103rect" width="100%" height="100%" fill="#ffcc00" stroke="black" stroke-width="5"/> <text id="room103label" font-size="24pt" x="55px" y="100px" fill="black">room 103</text> <text id="room103type" font-size="24pt" x="55px" y="150px" fill="black">standard office</text> </g> The g element acts as a container, so any instructions, such as the translate() transformation, apply to any elements within it. The end result is that the transformation moves all three rooms 400 pixels to the left, leaving the middle room showing in the viewport. Adding linking The only thing missing from the image now is the links from each room on the first floor to the floor plan for the second floor: <?xml version='1.0'?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" " <svg xmlns:xlink=" xmlns=" width="1200px" height="250px" viewbox=" " id="roomssvg"> <g id="mover" transform="translate(-400,0)"> <svg id="room101" width="400px" height="250px" x="0px" y="0px"> <rect id="room101rect" width="100%" height="100%" fill="#ccccff" stroke="black" stroke-width="5"/> <text id="room101label" font-size="24pt" x="55px" y="100px" fill="black">room 101</text> <text id="room101type" font-size="24pt" x="55px" y="150px" fill="black">standard office</text> <a xlink:href="rooms2ndfloor.html"><text id="room101link" font-size="15pt" x="55px" y="200px" fill="black">click to view 2nd Floor</text></a> </g> Linking in SVG is similar to linking in HTML, in that it uses an a tag and an href Page 8 of 39 Interactive, dynamic Scalable Vector Graphics
9 attribute. But SVG actually refers back to the XLink recommendation, so the document must declare the xlink namespace and use it for the href attribute. Otherwise, the link works just like a normal HTML link, as you'll see when the SVG image is embedded in the HTML page. The HTML container document In this application, the SVG file is embedded in an HTML document, Rooms.html, using the embed element. Much of the HTML container document consists of ECMAScript which is described in detail later in the tutorial, but for now here's a look at the basic framework: <html> <head> <title>xmml Room Design</title> <style type="text/css"> input {width: 150px; </style> </head> <body onload="initialize()" bgcolor="#eeeeff"> <form action=""> <table width="600"> <tr> <td align="center"> </tr> </table> <h3>xmml Room Design</h3> <h2>scarman Building</h2> <embed id="roomshere" width="400px" height="250px" type="image/svg+xml" src="rooms.svg"></td> <table> <tr> <td colspan="4" height="40" align="center"><b>current room to edit is: </b> <span id="currentroom"></span></td> </tr> <tr> <td> <input type="button" onclick="goleft=true; pandoc()" value="<< Scroll Left" /> </td> <td> <input type="button" onclick="toexec()" value="make Executive Office" /> </td> <td> <input type="button" onclick="tostandard()" value="make Standard Office" /> </td> <td> Interactive, dynamic Scalable Vector Graphics Page 9 of 39
10 <input type="button" onclick="goright=true; pandoc()" value="scroll Right >>" /> </td> </tr> <tr> <td> <input type="button" onclick="zoomin()" value="zoom In" /> </td> <td> <input type="button" onclick="increaseheight()" value="increase Height" /> </td> <td> <input type="button" onclick="decreaseheight()" value="decrease Height" /> </td> <td> <input type="button" onclick="zoomout()" value="zoom Out" /> </td> </tr> </table> </form> </body> </html> The SVG image is embedded using the non-official, but very useful, embed element. The embed element is, at present, the most commonly used element for embedding SVG images in HTML Web pages because of limitations in the browser implementations of the official object element. Notice that the type attribute of the embed element specifies that the image to be embedded is of type image/svg+xml, so the browser knows what to do with it. A simple table contains controls for the user to scroll left and right, to change the character of the room from a "standard" room to an "executive" one and back to standard, to change the height (or really, the depth) of the active room, and to zoom in and out. Notice that each button has an onclick attribute that specifies what happens when the user clicks the respective control. You'll see the actual scripts behind these handlers in Viewing floor plans on page 12. The document also has a span element to tell the user which room is currently active. Scripting determines the contents of the element. Viewing the document Opening the HTML document in an SVG-enabled browser initially shows the middle room: Page 10 of 39 Interactive, dynamic Scalable Vector Graphics
11 At this point, the browser signals an error because the Initialize() function isn't in place yet, but that's not a problem. If you don't see the room, however, you need to go back and check the installation of your SVG viewer. Interactive, dynamic Scalable Vector Graphics Page 11 of 39
12 Section 4. Viewing floor plans The viewport So far, you've created an image that is bigger than the window onto it. The user can clearly see Room 102, but Room 101 is off to the left where it can't be seen and Room 103 is off to the right where it can't be seen. You can make them visible in one of three ways: 1. Moving the image: To see the other rooms, you can move the image using the transform attribute, as in the original SVG image. Doing this moves the image under the open window that represents the viewport. This is not, however, the most efficient way of doing things. 2. Moving the viewport: Rather than moving the image, you can simply move the viewport so that it is over the part of the image you wish to view, much like moving a magnifying glass over a page in the phone book. Because the actual boundaries of the viewport are fixed in place by the browser, it appears to the user as though the image itself is moving, but it's actually the viewport moving with respect to the image. 3. Scaling the image: In addition to moving the image, you can also make it larger or smaller to determine the area of the picture that is still visible through the viewport, which remains the same size. In this section, I'll show you how to move the viewport in order to see different parts of the image, and how to scale the image to see more or less of it. Global variables and initialization You can start by declaring the global variables and calling the Initialize() function when the browser loads the page: <html> <head> <title>xmml Room Design</title> <style type="text/css"> input {width: 150px; </style> <script type="text/ecmascript"> // set global variables var htmlobj, SVGDoc, SVGRoot, viewbox, goleft, goright, innersvg; var currentsize, currentposition, currentroomid, currentroomlabel; var svgns = " function Initialize(){ htmlobj = document.getelementbyid("roomshere"); SVGDoc = htmlobj.getsvgdocument(); Page 12 of 39 Interactive, dynamic Scalable Vector Graphics
13 SVGRoot = SVGDoc.documentElement; // end function Initialize() </script> </head> <body onload="initialize()" bgcolor="#eeeeff"> <form action=""> <table width="600"> The htmlobj variable is used later as a reference to the embed element that accesses the SVG image. The SVGDoc variable represents the root node of the SVG image, the main svg element. The SVGRoot variable is used to represent the document element of the SVG image. The viewbox variable is used to hold the value of the viewbox attribute on the document element svg element. The svgns variable represents the namespace URI of the SVG namespace, to be used later in the script when you create new elements and attributes. The htmlobj variable uses the getelementbyid() method of the HTML document to identify the embed element -- <embed id="roomshere" width="400px" height="250px" type="image/svg+xml" src="rooms.svg"> -- as the value assigned to it. Next, the getsvgdocument() method associates the root node of the SVG document with the SVGDoc variable. References to the SVGDoc variable are references to the root node of the SVG image contained in the embed element. Thus you have created a way to associate events in the HTML document with variables that represent part of the SVG image displayed inside that HTML document. Finally, the script associates the SVGRoot variable with the document element of the SVG image. You'll need all of this information when you begin to scroll the image. Obtaining the current position The pandoc() function controls scrolling both to the left and to the right: SVGRoot = SVGDoc.documentElement; // end function Initialize() function pandoc(evt){ Interactive, dynamic Scalable Vector Graphics Page 13 of 39
14 viewbox = SVGRoot.getAttribute('viewBox'); var viewvals = viewbox.split(' '); currentposition = parsefloat(viewvals[0]); // end function pandoc() </script> First the script assigns the viewbox variable the value of the viewbox attribute of the svg document element. Remember, the SVGRoot element represents the main svg element of the image, so the getattribute() method works just as it would on any other XML document, retrieving the string value of the viewbox attribute. The difficulty here is that viewbox is actually a set of space-delimited values, of which you only want the first, so the script creates an array variable, viewvals, by using the ECMAScript split() function to extract each component of the value The parsefloat() method then converts the string value 0 so that it can be used as a numeric value 0. Once you have the current position, you can change it. Moving the viewport Next, determine whether the viewport should move left or right and adjust currentposition accordingly: function pandoc(evt){ viewbox = SVGRoot.getAttribute('viewBox'); var viewvals = viewbox.split(' '); currentposition = parsefloat(viewvals[0]); if (goleft == true){ if (currentposition > -400) { currentposition = currentposition - 200; goleft = false; if (goright == true){ if (currentposition < 400) { currentposition = currentposition + 200; goright = false; viewvals[0] = currentposition; SVGRoot.setAttribute('viewBox', viewvals.join(' ')); // end function pandoc() Page 14 of 39 Interactive, dynamic Scalable Vector Graphics
15 If goleft is true, then pandoc() decreases currentposition's value by 200, if the value is greater than This prevents the SVG image from scrolling further to the left than the left edge of Room 101. The goleft variable is then assigned the value false. Similarly, if you are moving to the right, the script adds 200 pixels to the current position. Now remember, it's the viewport you're moving, so the new value of the current position has to go back into the viewbox attribute. Once the new value has been added back into the array, the join() function puts the altered value of the viewbox variable back together again. The value is then assigned to the viewbox attribute of the svg element using the setattribute() method. As a consequence, the SVG image appears to be scrolled 200 pixels in the desired direction. For example, to fully reveal Room 101 the user needs to click twice on the Scroll Left text control. Activating the scroll When the user clicks a control, the browser executes any ECMAScript code contained in the onclick attribute. In the case of the Scroll Left and Scroll Right buttons, the onclick attribute specifies that a global variable should be assigned the value of true, and the pandoc() function should be called: <tr> <td> <input type="button" onclick="goleft=true; pandoc()" value="<< Scroll Left" /> </td> <td> <input type="button" onclick="toexec()" value="make Executive Office" /> </td> <td> <input type="button" onclick="tostandard()" value="make Standard Office" /> </td> <td> <input type="button" onclick="goright=true; pandoc()" value="scroll Right >>" /> </td> </tr> (It's also possible to pan an image in the Adobe SVG viewer by holding down the ALT key, pressing down the left mouse button, and moving the mouse, but for the purposes of this tutorial you need to directly control where and how much the viewport moves instead.) You can also change the portions of the image seen through the viewport by making the image itself larger or smaller. Interactive, dynamic Scalable Vector Graphics Page 15 of 39
16 Zooming in and out The controls also provide a way to zoom in and out of the image. When the user clicks the Zoom In button, the browser executes the zoomin() function. When the user clicks the Zoom Out button, the browser executes the zoomout() function: SVGRoot.setAttribute('viewBox', viewvals.join(' ')); // end function pandoc() function zoomin(){ if (SVGRoot.currentScale < 5){ SVGRoot.currentScale = SVGRoot.currentScale * 1.5; // end function zoomin function zoomout(){ if (SVGRoot.currentScale > 0.3){ SVGRoot.currentScale = SVGRoot.currentScale * 0.67; // end function zoomout </script> The zoomin() function is straightforward. The SVGRoot variable has already been assigned the svg document element of the SVG image in the Initialize() function, and when an SVG image is first loaded the value of the currentscale property of the SVGRoot variable is 1.0. Each time the user clicks the Zoom In button, the script multiplies the value of the currentscale property by 1.5, but only if the existing value of that property is less than 5. This has the effect of zooming into the SVG image or, if you prefer, increasing the size of all parts of the image. The zoomout() function works the same way as zoomin(), but in the other direction. Zooming and panning in action It's important to understand the effect that changes in one property have on the others. For example, each "scroll" action moves the image 200 pixels in one direction or the other, so it's natural to assume that if the image has been scaled to half its normal size, you can scroll past an entire 400-pixel-wide room in one click, but that's not actually the case. When you change the scale, all measurements are affected, as you can see in this image: Page 16 of 39 Interactive, dynamic Scalable Vector Graphics
17 Now that you can control what parts of the image you see, I'll show you how to change the image itself. Interactive, dynamic Scalable Vector Graphics Page 17 of 39
18 Section 5. Manipulating an SVG image Changing the room The purpose of this tutorial is to create an SVG floor plan that the user can manipulate to make changes to better suit his or her needs. For example, a home builder might enable users to substitute a den for a bedroom, or a utility room for a bathroom. Users might also be able to stretch or shrink rooms. In this tutorial, you'll get to know all of those concepts by enabling users to change a room's type from Executive Office to Standard Office and back, and to make the room larger or smaller. To make these changes to the image, you'll alter, add, and remove objects that are part of the SVG image's Document Object Model (DOM). First, you need to identify which of the three rooms in the SVG image is to be changed. Identifying the current room To unambiguously identify which room is to be altered, it is necessary to determine which room is visible to the user at the time the user clicks the Make Executive Office or Make Standard Office button. To do that, you'll add the setcurrentroom() function to the page: // end function Initialize() function setcurrentroom(){ viewbox = SVGRoot.getAttribute('viewBox'); var viewvals = viewbox.split(' '); currentposition = parsefloat(viewvals[0]); if (currentposition % 400!= 0) { currentroomid = null; currentroomlabel = "None. Please scroll to desired room."; else if (currentposition / 400 == 0) { currentroomid = "Room102"; currentroomlabel = "Room 102"; else if (currentposition / 400 == -1) { currentroomid = "Room101"; currentroomlabel = "Room 101"; else if (currentposition / 400 == 1) { currentroomid = "Room103"; currentroomlabel = "Room 103"; function pandoc(evt){ Page 18 of 39 Interactive, dynamic Scalable Vector Graphics
19 This is the same technique you used in Obtaining the current position on page 13, but now you're using that information to determine which of the rooms currently lines up with the left-hand edge of the viewport. If none of the boxes is lined up, as is the case if the viewport is not a multiple of 400 pixels from its original position, there is no current room, and the script sets the value of currentroomid accordingly. In the other cases, notice that the currentroomid value matches the prefix of the relevant id values within the SVG document (as seen in The rooms on page 6 ). You'll use that information later, when you start manipulating the document. But this function does you no good unless it gets executed at the proper time. Setting the current room Two situations warrant the explicit checking for the current room: the initialization of the page and panning of the document. Executing the setcurrentroom() script at those moments is straightforward: function Initialize(){ htmlobj = document.getelementbyid("roomshere"); SVGDoc = htmlobj.getsvgdocument(); SVGRoot = SVGDoc.documentElement; setcurrentroom(); // end function Initialize() function setcurrentroom(){ function pandoc(evt){ currentposition = parsefloat(viewvals[0]); if (goleft == true){ if (currentposition > -400) { currentposition = currentposition - 200; goleft = false; if (goright == true){ if (currentposition < 400) { currentposition = currentposition + 200; goright = false; viewbox = SVGRoot.getAttribute('viewBox'); var viewvals = viewbox.split(' '); viewvals[0] = currentposition; SVGRoot.setAttribute('viewBox', viewvals.join(' ')); setcurrentroom(); Interactive, dynamic Scalable Vector Graphics Page 19 of 39
20 // end function pandoc() When the page is loaded, the Intialize() function executes, so this is an easy way to start off by initializing the global currentposition variable. Also, because it is a global variable, and because you know it's been set, you don't have to retrieve the current viewbox attribute at the beginning of pandoc(). You will, however, need the array at the end of the script so you can save the new value. Once the viewport has been moved, you need to re-set the current room to the new value. Now you just have to tell the user what room he or she is about to change. Indicating the current room You may remember that within the HTML document, a span element has an id value of currentroom: <tr> <td colspan="4" height="40" align="center"><b>current room to edit is: </b> <span id="currentroom"></span></td> </tr> It's important to provide the user with this information because no changes can be made to any room if the image is between rooms, so to speak. So within the setcurrentroom() function, you can set a value for this text: function setcurrentroom(){ viewbox = SVGRoot.getAttribute('viewBox'); var viewvals = viewbox.split(' '); currentposition = parsefloat(viewvals[0]); if (currentposition % 400!= 0) { currentroomid = null; currentroomlabel = "None. Please scroll to desired room."; else if (currentposition / 400 == 0) { currentroomid = "Room102"; currentroomlabel = "Room 102"; else if (currentposition / 400 == -1) { currentroomid = "Room101"; currentroomlabel = "Room 101"; else if (currentposition / 400 == 1) { currentroomid = "Room103"; currentroomlabel = "Room 103"; document.getelementbyid("currentroom").innerhtml = currentroomlabel; Page 20 of 39 Interactive, dynamic Scalable Vector Graphics
21 After the calculations are done, the contents of the span element are set to the current label, so the user knows what room he or she is about to edit, or in the case of a split situation, what to do about it: Now that you know what room you're working with, you can start changing it. Changing the background color The easiest way to make a change to an SVG image is to change the value of an attribute. To signify the power of an Executive Office, that room's background color is to be changed to red. Changing the room to an Executive Office involves changing the fill of the rect element. When the currentroomid is Room102, the setattribute() method changes the value of the fill attribute of the rect element, which has the id attribute with a value of Room102Rect. Interactive, dynamic Scalable Vector Graphics Page 21 of 39
22 // end function pandoc() function toexec(){ if (currentroomid == null) { alert("ambiguous room position! \n Please align a room "+ "precisely before attempting to change room type."); else { SVGDoc.getElementById(currentRoomId+"Rect").setAttribute("fill", "#FF0000" // end function toexec() function zoomin(){ if (SVGRoot.currentScale < 5){ At this stage, the background color is red but everything else remains the same. Now you can start removing pieces. Deleting parts of the SVG image In changing a room to an Executive Office, you not only change the color, but also the text. The current room label and room number are removed, and a new label and number are added, though the number is essentially the same: function toexec(){ if (currentroomid == null) { alert("ambiguous room position! \n Please align a room "+ "precisely before attempting to change room type."); else { SVGDoc.getElementById(currentRoomId+"Rect").setAttribute("fill", "#FF0000"); innersvg = SVGDoc.getElementById(currentRoomId); oldchild = SVGDoc.getElementById(currentRoomId+"Label"); innersvg.removechild(oldchild); oldchild = SVGDoc.getElementById(currentRoomId+"Type"); innersvg.removechild(oldchild); // end function toexec() The innersvg variable is assigned the object retrieved by the getelementbyid() Page 22 of 39 Interactive, dynamic Scalable Vector Graphics
23 method. For example, if the currentroomid is Room102, the script essentially executes: innersvg = SVGDoc.getElementById("Room102"); This is the nested svg element for Room 102. Next the script retrieves a reference to the label ("Room102Label") text node and removes it from the innersvg element. The script then does the same for the type. At this stage, the first two text elements (but not the one contained in the hyperlink) have been removed. Adding new elements to the SVG image After the deletion of two text elements and the change of background color, the new Executive Office gets new text elements: else { SVGDoc.getElementById(currentRoomId+"Rect").setAttribute("fill", "#FF0000"); innersvg = SVGDoc.getElementById(currentRoomId); oldchild = SVGDoc.getElementById(currentRoomId+"Label"); innersvg.removechild(oldchild); oldchild = SVGDoc.getElementById(currentRoomId+"Type"); innersvg.removechild(oldchild); mydata = SVGDoc.createTextNode("Executive Office"); newtext = SVGDoc.createElementNS(svgns, "text"); newtext.appendchild(mydata); SVGDoc.getElementById(currentRoomId).appendChild(newText); mydata = SVGDoc.createTextNode(currentRoomLabel); newtext = SVGDoc.createElementNS(svgns, "text"); newtext.appendchild(mydata); SVGDoc.getElementById(currentRoomId).appendChild(newText); // end function toexec() As with any DOM operation, you first create a text node using the Document object (in this case, SVGDoc ). It should contain the text "Executive Office". This text node needs to be added to an element named "text", but that element must be aware that it is part of the SVG namespace, so use createelementns() to create the new element. The global variable svgns specifies the namespace URI. Next, add the text node to the newly created text element node using the appendchild() method. The text element node (and its text node child) need to be added to the correct svg element node. The getelementbyid() method retrieves the svg element node for the correct room and appends the new text element node. Interactive, dynamic Scalable Vector Graphics Page 23 of 39
24 Carry out the same process to add the second new text element to the executive room. Setting attributes Once the script creates the text nodes and adds them to the text elements, their positioning and appearance depend on the attributes of the textelement. Set those within the script as well: mydata = SVGDoc.createTextNode("Executive Office"); newtext = SVGDoc.createElementNS(svgns, "text"); newtext.setattributens(null, "id", currentroomid+"type"); newtext.setattributens(null, "x", "55px"); newtext.setattributens(null, "y", "100px"); newtext.setattributens(null, "font-size", "24pt"); newtext.setattributens(null, "stroke", "white"); newtext.appendchild(mydata); SVGDoc.getElementById(currentRoomId).appendChild(newText); mydata = SVGDoc.createTextNode(currentRoomLabel); newtext = SVGDoc.createElementNS(svgns, "text"); newtext.setattributens(null, "id", currentroomid+"label"); newtext.setattributens(null, "x", "55px"); newtext.setattributens(null, "y", "150px"); newtext.setattributens(null, "font-size", "24pt"); newtext.setattributens(null, "stroke", "white"); newtext.appendchild(mydata); SVGDoc.getElementById(currentRoomId).appendChild(newText); // end function toexec() Remember, performing these operations is the same as creating a text element as: <svg:text id="room102label" x="55px" y="150px" font-size="24pt" stroke="white">room 102</svg:text> The end result is a new Executive Office: Page 24 of 39 Interactive, dynamic Scalable Vector Graphics
25 The same process can create a Standard Office out of an Executive Office. Creating the Standard Office The process for creating a Standard Office is essentially the same as for creating an Executive Office: // end function toexec() function tostandard(){ if (currentroomid == null){ alert("ambiguous room position! \n Please align a room "+ "precisely before attempting to change room type."); else { SVGDoc.getElementById(currentRoomId+"Rect").setAttribute("fill", "#CCFFCC" innersvg = SVGDoc.getElementById(currentRoomId ); Interactive, dynamic Scalable Vector Graphics Page 25 of 39
26 oldchild = SVGDoc.getElementById(currentRoomId+"Label"); innersvg.removechild(oldchild); oldchild = SVGDoc.getElementById(currentRoomId+"Type"); innersvg.removechild(oldchild); mydata = SVGDoc.createTextNode("Standard Office"); newtext = SVGDoc.createElementNS(svgns, "text"); newtext.setattributens(null, "id", currentroomid+"type"); newtext.setattributens(null, "x", "55px"); newtext.setattributens(null, "y", "150px"); newtext.setattributens(null, "font-size", "24pt"); newtext.setattributens(null, "stroke", "black"); newtext.appendchild(mydata); SVGDoc.getElementById(currentRoomId).appendChild(newText); mydata = SVGDoc.createTextNode(currentRoomLabel); newtext = SVGDoc.createElementNS(svgns, "text"); newtext.setattributens(null, "id", currentroomid+"label"); newtext.setattributens(null, "x", "55px"); newtext.setattributens(null, "y", "100px"); newtext.setattributens(null, "font-size", "24pt"); newtext.setattributens(null, "stroke", "black"); newtext.appendchild(mydata); SVGDoc.getElementById(currentRoomId).appendChild(newText); // end if // end function tostandard() function zoomin(){ if (SVGRoot.currentScale < 5){ Increasing room height One of the goals of this project is to enable the user to change the size of a room in the layout at will. In this example, the user gets to change the height of the room as it's rendered in the floor plan: // end if // end function tostandard() function increaseheight(){ if (currentroomid == null) { alert("ambiguous room position! \n Please align a room "+ "precisely before attempting to change room height."); else { innersvg = SVGDoc.getElementById(currentRoomId); currentsize = parseint(innersvg.getattributens(null, "height").substr( 0, if (currentsize < 500){ currentsize = currentsize + 50; currentsize = currentsize + "px"; Page 26 of 39 Interactive, dynamic Scalable Vector Graphics
27 innersvg.setattributens(null, "height", currentsize); else { alert("size of "+currentroomlabel+" is already at the maximum allowed."); // end function increaseheight() function zoomin(){ if (SVGRoot.currentScale < 5){ Once again, the SVGDoc object represents the root svg element, so innersvg represents the appropriate room. The value of the height attribute when the document loads is "300px", which is a string value, so the substr() method is used to extract the first three characters of the string and the parseint() method is used to convert that to an integer. For the substr() function, the first argument is the starting character (numbering starts at zero) and the second argument indicates the number of characters in the substring. The maximum allowed height dimension for the room is 500 pixels (or for the real room, a depth of 50 feet), so the script tests that before any change is made to the height. If the height is less than 500, increase the value of currentsize by 50. Finally, concatenate the string "px" to the value of currentsize and assign the new value of the currentsize variable to the height attribute of the svg element for the appropriate room. Because this is a live object, the changes, like the changes in the color and text of the rooms, show immediately. The size of the svg element increases, and because the contained rect element has a height attribute of 100%, it increases to the new size of the svg element: Interactive, dynamic Scalable Vector Graphics Page 27 of 39
28 Decreasing the height involves basically the same process. Decreasing room height The decreaseheight() script is virtually the same as the increaseheight() script: else { alert("size of "+currentroomlabel+" is already at the maximum allowed."); // end function increaseheight() function decreaseheight(){ if (currentroomid == null) { alert("ambiguous room position! \n Please align a room "+ "precisely before attempting to change room height."); Page 28 of 39 Interactive, dynamic Scalable Vector Graphics
29 else { innersvg = SVGDoc.getElementById(currentRoomId); currentsize = parseint(innersvg.getattributens(null, "height").substr( 0, if (currentsize > 250){ currentsize = currentsize - 50; currentsize = currentsize + "px"; innersvg.setattributens(null, "height", currentsize); else{ alert("size of "+currentroomlabel+" is already at the minimum allowed."); // end function decreaseheight() function zoomin(){ if (SVGRoot.currentScale < 5){ Taking things one step further In this section, you've seen how to add, remove, and alter elements in the portion of the XML document that is the SVG image. Although the tutorial shows a simple example, it discusses all of the concepts necessary for a sophisticated floor plan editing system. For example, the tutorial explains how to remove elements from an SVG image. You can take this one step further and enable the user to remove a room from the floor plan altogether. Similarly, the tutorial demonstrates the addition of new objects to the SVG image. You can use this same concept to enable the user to add an entirely new room to the floor plan. The tutorial shows a simple increase and decrease in the height of a bounding box in response to the user's clicking of a button. You can expand this to enable the user to drag walls, or even rooms, to new locations. Just remember, though, that if a user wants to move a wall that's adjacent to another room, that room has to move as well. All of these capabilities are available to you because of the flexibility provided by SVG in particular, and XML in general. In addition, you can dynamically generate SVG using XSL Transformations. Interactive, dynamic Scalable Vector Graphics Page 29 of 39
30 Section 6. XSLT and SVG Creating SVG dynamically SVG images can be created by hand, either by coding directly in a text editor or by drawing in a graphics, CAD, or similar package that has SVG export capabilities. An alternate approach is to create SVG dynamically by transforming source XML using XSLT or a procedural programming language. Typically this is done server-side to allow SVG images to be created to reflect the current state of, for example, a data store. Just as dynamic creation of HTML Web pages is the norm for many purposes, dynamic creation of SVG images is also likely to become the normal method of creating them. Hand coding or drawing will produce the skeleton of the SVG document and dynamic content will be added using XSLT and various other alternative server-side languages. Dynamic SVG generation also enables you to quickly make changes. For example, just as an SVG chart can react to new data in real time (or as frequently as its updated, at any rate) SVG images such as floor plans can react to situations such as product line changes. If all of the initial floor plans are stored as XML documents that describe each room, changes to that information in the database will be reflected in the document. For example, if rooms were to start out at 20 feet instead of 25, this would show as soon as the change was made. In this section I'll show you a simple example of dynamic creation of SVG by transforming the source XML document, RoomData.xml, into an SVG image that can be inserted into the HTML container document, Rooms.html. The XML source document The data held in XML about each room on the first floor is very straightforward. The room number, dimensions, and the type of room are stored in the XML document, RoomData.xml: <?xml version='1.0'?> <RoomData> <Room position="1" type="standard" width="40" depth="25" /> <Room position="2" type="standard" width="40" depth="22" /> <Room position="3" type="standard" width="40" depth="25" /> </RoomData> In this case, the source XML is very simple. It describes the initial state of each room. Notice that it shows the position of each room, and not the room number. This way, the data can be used to generate a floor plan for different floors, or with a different numbering scheme. Notice also that the middle room is slightly less deep than the others, unlike the static examples so far. Page 30 of 39 Interactive, dynamic Scalable Vector Graphics
31 Choosing an XSLT processor At the time of this writing, several XSLT processors are available. Two widely used XSLT open-source XSLT processors are Saxon and Xalan (see Resources on page 38 ). Currently I am exploring the additional functionality of XSLT 2.0 and so am using Saxon 7.5, which implements more of XSLT 2.0 than any other XSLT processor meantime. Fortunately, Saxon is also a powerful and well-tested XSLT 1.0 processor so it meets our needs for this tutorial too. The skeleton of the SVG image Here's the basic skeleton of the SVG image: <?xml version='1.0'?> <xsl:stylesheet version="1.0" xmlns:xsl=" xmlns:xlink=" xmlns=" <xsl:output method="xml" indent="yes" encoding="utf-8" /> <xsl:template match="/"> <svg xmlns:xlink=" xmlns=" width="1200px" height="250px" viewbox=" " id="roomssvg"> <g id="mover" transform="translate(-400,0)"> <xsl:apply-templates select="roomdata/room" /> </g> </xsl:template> </xsl:stylesheet> Notice that the stylesheet has namespace declarations for the XSLT namespace and the SVG namespace on the document element, and that the SVG namespace is the default namespace for the document. The stylesheet specifies the output method as XML. The xsl:output element can, if preferred, be omitted because the default output method is xml. However, if you want to indent the output you need to use the xsl:output element and indicate it using the indent attribute. The main template creates the root svg element and the g container element, and then calls additional templates for each room. Interactive, dynamic Scalable Vector Graphics Page 31 of 39
32 Creating each room Now take a look at the room template. <g id="mover" transform="translate(-400,0)"> <xsl:apply-templates select="roomdata/room" /> </g> </xsl:template> <xsl:template match="room"> <xsl:element name="svg"> <xsl:attribute name="id"><xsl:value-of /></xsl:attribute> <xsl:attribute name="width"><xsl:value-of select="(10 />px</xsl:attribute> <xsl:attribute name="height"><xsl:value-of select="(10 />px</xsl:attribute> <xsl:attribute name="x"><xsl:value-of select="concat(((@position - 1) * 400), 'px')" /> </xsl:attribute> <xsl:attribute name="y">0px</xsl:attribute> </xsl:element> <!-- End of nested svg Element --> </xsl:template> </xsl:stylesheet> The xsl:element element creates the nested svg element that is the container element for each room. The xsl:attribute element is used to specify the attributes of the svg element. An alternate approach would be to specify the svg element and its attributes as literal result elements, but that's not an option here because some of the attributes are dynamically generated based on the data. The value of the id attribute is specified using the XPath concat() function to concatenate the literal string Room 10 with the value of the position attribute of the Room element node, which is derived from the source document. The values of the width and height attributes are determined by assuming that the scale is 10 pixels per foot, so again the xsl:value-of element supplies the calculated value. This makes it simple to change the dimensions of the room; as long as the XML source is correct, the room will be the proper size. The value of the x attribute is different for each room, and depends on the position. In this project, you assume that each room is the same width, but in reality you would either need to build in logic to determine the appropriate location based on the previous rooms or include the position in the data. The concat() function then adds the text px, signifying pixels, to complete the value of the x attribute. The value of the y attribute doesn't change, and is supplied literally. So far, the resulting document looks like this: <?xml version="1.0" encoding="utf-8"?> <svg xmlns=" Page 32 of 39 Interactive, dynamic Scalable Vector Graphics
33 xmlns:xlink=" id="roomssvg" viewbox=" " height="250px" width="1200px"> <g transform="translate(-400,0)" id="mover"> <svg id="room101" width="400px" height="250px" x="0px" y="0px"/> <svg id="room102" width="400px" height="220px" x="400px" y="0px"/> <svg id="room103" width="400px" height="250px" x="800px" y="0px"/> </g> Now I'll show you the rect element child of the svg element. Adding the background rectangle To add the colored background rectangle it is necessary to create a rect element: <xsl:template match="room"> <xsl:element name="svg"> <xsl:attribute name="id"><xsl:value-of /></xsl:attribute> <xsl:attribute name="width"> <xsl:value-of select="(10 />px</xsl:attribute> <xsl:attribute name="height"> <xsl:value-of select="(10 />px</xsl:attribute> <xsl:attribute name="x"><xsl:value-of select="concat(((@position - 1) * 400), 'px')" /> </xsl:attribute> <xsl:attribute name="y">0px</xsl:attribute> <xsl:element name="rect"> <xsl:attribute name="id"><xsl:value-of 'Rect')" /> </xsl:attribute> <xsl:attribute name="width">100%</xsl:attribute> <xsl:attribute name="height">100%</xsl:attribute> <xsl:choose> <xsl:when test="@position='1'"> <xsl:attribute name="fill">#ccccff</xsl:attribute> </xsl:when> <xsl:when test="@position='2'"> <xsl:attribute name="fill">#ccffcc</xsl:attribute> </xsl:when> <xsl:when test="@position='3'"> <xsl:attribute name="fill">#ffcc00</xsl:attribute> </xsl:when> </xsl:choose> <xsl:attribute name="stroke">black</xsl:attribute> <xsl:attribute name="stroke-width">5</xsl:attribute> </xsl:element> <!-- End of rect Element --> </xsl:element> <!-- End of nested svg Element --> </xsl:template> </xsl:stylesheet> The value of the id attribute of the rect element is constructed by concatenating the string literal Room with the value of the number attribute and the string literal Rect, Interactive, dynamic Scalable Vector Graphics Page 33 of 39
34 and the stylesheet supplies the values of the width and height attributes literally. The three rooms (101, 102, and 103) are to have different colored backgrounds, so the xsl:choose element specifies what happens depending on the value of the position attribute of the Room element in the source document. If the value of the test attribute of an xsl:when element returns the boolean value of true, then the content specified (in this case, the fill attribute) is added by the XSLT processor to the result tree. Finally, the stroke and stroke-width attributes of the rect element are supplied literally. This leaves you with a current result of: <?xml version="1.0" encoding="utf-8"?> <svg xmlns=" xmlns:xlink=" id="roomssvg" viewbox=" " height="250px" width="1200px"> <g transform="translate(-400,0)" id="mover"> <svg id="room101" width="400px" height="250px" x="0px" y="0px"> <rect id="room 101Rect" width="100%" height="100%" fill="#ccccff" stroke="black" stroke-width="5"/> <svg id="room102" width="400px" height="220px" x="400px" y="0px"> <rect id="room 102Rect" width="100%" height="100%" fill="#ccffcc" stroke="black" stroke-width="5"/> <svg id="room103" width="400px" height="250px" x="800px" y="0px"> <rect id="room 103Rect" width="100%" height="100%" fill="#ffcc00" stroke="black" stroke-width="5"/> </g> Now it's just a matter of adding the text elements. Adding the text elements Adding the text elements involves the same techniques used in Creating each room on page 32 and Adding the background rectangle on page 33 : <xsl:attribute name="stroke">black</xsl:attribute> <xsl:attribute name="stroke-width">5</xsl:attribute> </xsl:element> <!-- End of rect Element --> <xsl:element name="text"> <xsl:attribute name="id"><xsl:value-of 'Label')" /> </xsl:attribute> <xsl:attribute name="font-size">24pt</xsl:attribute> <xsl:attribute name="x">55px</xsl:attribute> <xsl:attribute name="y">100px</xsl:attribute> <xsl:attribute name="fill">black</xsl:attribute> Room 10<xsl:value-of select="@position" /> </xsl:element> <!-- End of first text Element --> Page 34 of 39 Interactive, dynamic Scalable Vector Graphics
35 <xsl:element name="text"> <xsl:attribute name="id"><xsl:value-of 'Type')" /> </xsl:attribute> <xsl:attribute name="font-size">24pt</xsl:attribute> <xsl:attribute name="x">55px</xsl:attribute> <xsl:attribute name="y">150px</xsl:attribute> <xsl:attribute name="fill">black</xsl:attribute> <xsl:value-of /> office </xsl:element> <!-- End of second text Element --> <xsl:element name="a"> <xsl:attribute name="xlink:href">rooms2ndfloor.html</xsl:attribute> <xsl:element name="text"> <xsl:attribute name="id"><xsl:value-of 'Link')" /> </xsl:attribute> <xsl:attribute name="font-size">15pt</xsl:attribute> <xsl:attribute name="x">55px</xsl:attribute> <xsl:attribute name="y">200px</xsl:attribute> <xsl:attribute name="fill">black</xsl:attribute> Click to view 2nd Floor </xsl:element> <!-- End of third text Element --> </xsl:element> <!-- End of the <a> Element --> </xsl:element> <!-- End of nested svg Element --> </xsl:template> </xsl:stylesheet> As before, the concat() function helps to create the id attribute of the text element, incorporating the value of the position attribute, while the values of the font-size, x, y, and fill attributes are supplied literally. Once the attributes of the text element are in place, the value of the xsl:value-of element helps to specify the actual text of the element by outputting the position attribute of the Room element from the source document. The construction of the second text element is similar. Finally, the stylesheet specifies the link to the second floor. Notice the namespace information on the attribute name. The final document With all of these changes in place, the stylesheet can generate a complete document. In fact, if you wanted to, you could add a fourth room to the source document: <?xml version='1.0'?> <RoomData> <Room position="1" type="standard" width="40" depth="25" /> <Room position="2" type="standard" width="40" depth="22" /> <Room position="3" type="standard" width="40" depth="25" /> <Room position="4" type="standard" width="40" depth="22" /> </RoomData> Interactive, dynamic Scalable Vector Graphics Page 35 of 39
36 This room would automatically be added to the SVG document: <?xml version="1.0" encoding="utf-8"?> <svg xmlns=" xmlns:xlink=" id="roomssvg" viewbox=" " height="250px" width="1200px"> <g transform="translate(-400,0)" id="mover"> <svg id="room101" width="400px" height="250px" x="0px" y="0px"> <rect id="room 101Rect" width="100%" height="100%" fill="#ccccff" stroke="black" stroke-width="5"/> <text id="room 101Label" font-size="24pt" x="55px" y="100px" fill="black"> Room 101</text> <text id="room 101Type" font-size="24pt" x="55px" y="150px" fill="black">standard office</text> <a xlink:href="rooms2ndfloor.html"> <text id="room 101Link" font-size="15pt" x="55px" y="200px" fill="black">click to view 2nd Floor </text> </a> <svg id="room102" width="400px" height="220px" x="400px" y="0px"> <rect id="room 102Rect" width="100%" height="100%" fill="#ccffcc" stroke="black" stroke-width="5"/> <text id="room 102Label" font-size="24pt" x="55px" y="100px" fill="black"> Room 102</text> <text id="room 102Type" font-size="24pt" x="55px" y="150px" fill="black">standard office</text> <a xlink:href="rooms2ndfloor.html"> <text id="room 102Link" font-size="15pt" x="55px" y="200px" fill="black">click to view 2nd Floor </text> </a> <svg id="room103" width="400px" height="250px" x="800px" y="0px"> <rect id="room 103Rect" width="100%" height="100%" fill="#ffcc00" stroke="black" stroke-width="5"/> <text id="room 103Label" font-size="24pt" x="55px" y="100px" fill="black">room 103</text> <text id="room 103Type" font-size="24pt" x="55px" y="150px" fill="black">standard office</text> <a xlink:href="rooms2ndfloor.html"> <text id="room 103Link" font-size="15pt" x="55px" y="200px" fill="black">click to view 2nd Floor </text> </a> <svg id="room104" width="400px" height="220px" x="1200px" y="0px"> <rect id="room 104Rect" width="100%" height="100%" stroke="black" stroke-width="5"/> <text id="room 104Label" font-size="24pt" x="55px" y="100px" fill="black">room 104</text> <text id="room 104Type" font-size="24pt" x="55px" y="150px" fill="black">standard office</text> <a xlink:href="rooms2ndfloor.html"> <text id="room 104Link" font-size="15pt" x="55px" y="200px" fill="black">click to view 2nd Floor </text> </a> </g> Page 36 of 39 Interactive, dynamic Scalable Vector Graphics
37 Of course, to truly make use of the new room, you'd have to make some changes to both the ECMAScript and the stylesheet. The script won't allow the user to scroll far enough to the right to see the new room, and the stylesheet only allows for three rooms, so the rectangle turns up with a default fill color of black, obscuring its contents. Still, these are minor issues that would be resolved in a full-fledged application. Limitations of XSLT 1.0 One limitation of XSLT 1.0 is lack of standard support for creation of multiple result documents. Individual XSLT processors may provide extension elements to achieve the creation of multiple output documents, so to create SVG images for the first and second floors (and any other floors that the building might have) it's necessary to create multiple XSLT stylesheets or use proprietary extension elements. Alternatively, an xsl:parameter element could be added to the stylesheet to accept a parameter from the command line or the relevant application to specify a floor to be created. Appropriate use of XPath functions, such as the concat() and substring(), would enable appropriate elements in an extended XML source document to be appropriately processed. However, an easier approach is desirable. XSLT 2.0 is on the horizon and will soon provide standard techniques to produce multiple result documents. XSLT 2.0 is currently at Working Draft stage at the W3C. It has many new features such as improved grouping functionality, and many new functions available from XPath 2.0, as well as the use of regular expressions. However, in creating SVG in the way you have done here, the facility to create multiple documents is of great interest. In XSLT 2.0 it is possible to create multiple result documents. However, the transformation is not limited to creating documents of a particular type -- SVG for example -- but can create multiple documents, some of which are, for example, HTML and others are SVG. Thus with a full data store containing information on each room in a building and an XSLT 2.0 stylesheet, it is possible to create multiple HTML documents, each with an appropriate SVG image. Interactive, dynamic Scalable Vector Graphics Page 37 of 39
38 Section 7. Summary Tutorial summary Because of its structure as an XML document, an SVG image can be both created dynamically and manipulated interactively by a user. This tutorial has demonstrated the use of ECMAScript/JavaScript to enable interaction with an SVG image. It has also discussed dynamically producing an SVG image. Topics included: Producing a simplified floor plan in SVG Embedding the SVG in an HTML document and communicating events in the HTML document to the SVG image Discussion of the SVG viewbox attribute and how to use it to control scrolling of SVG Scrolling between rooms using ECMAScript scripting Deleting parts of the floor plan under script control Adding new parts of the document under script control Dynamically generating SVG using XSLT Using ECMAScript and XSLT with SVG is a powerful and flexible approach to creating interactive SVG dynamically. This tutorial has introduced you to techniques that you can apply in larger projects. Resources SVG provides such enormous capabilities that it is impossible to cover them all in a single tutorial. For more information on SVG and related topics, see the following resources: Read the "Introduction to Scalable Vector Graphics" developerworks tutorial ( by Nicholas Chase (February, 2002). Read the Scalable Vector Graphics 1.0 Recommendation from the World Wide Web Consortium ( Read Doug Tidwell's tutorial, "Transforming XML into SVG" ( (developerworks, updated March, 2001). Read "An Introduction to Scalable Vector Graphics," by J. David Eisenberg ( Read SVG Unleashed, by Andrew Watt, Chris Lilley et al. Read Real-World SVG by Jackson West. Page 38 of 39 Interactive, dynamic Scalable Vector Graphics
39 Check out the tutorials and samples in Adobe's SVG Zone ( Read "Scalable Vector Graphics: The Art is in the Code," by Eddy Traversa ( Get your hands on two of the most widely used XSLT open-source XSLT processors -- Saxon ( and Xalan ( For more information on XML in general and SVG in particular, turn to the developerworks XML zone ( Find out how you can become an IBM Certified Developer in XML and related technologies ( Downloads Download the Adobe SVG Viewer (version 3.0) from Download Corel's Smart Graphics Studio from Smart Graphics Studio ( In addition, Corel has released an SVG viewer which is under ongoing development. Download the Batik SVG viewer and toolkit from the Apache Project at Download Jasc's WebDraw from Feedback Please send us your feedback on this tutorial. We look forward to hearing from you! Colophon This tutorial was written entirely in XML, using the developerworks Toot-O-Matic tutorial generator. The open source Toot-O-Matic tool is an XSLT stylesheet and several XSLT extension functions that convert an XML file into a number of HTML pages, a zip file, JPEG heading graphics, and two PDF files. Our ability to generate multiple text and binary formats from a single source file illustrates the power and flexibility of XML. (It also saves our production team a great deal of time and effort.) You can get the source code for the Toot-O-Matic at www6.software.ibm.com/dl/devworks/dw-tootomatic-p. The tutorial Building tutorials with the Toot-O-Matic demonstrates how to use the Toot-O-Matic to create your own tutorials. developerworks also hosts a forum devoted to the Toot-O-Matic; it's available at www-105.ibm.com/developerworks/xml_df.nsf/allviewtemplate?openform&restricttocategory=11. We'd love to know what you think about the tool. Interactive, dynamic Scalable Vector Graphics Page 39 of 39
CIS 467/602-01: Data Visualization
CIS 467/602-01: Data Visualization HTML, CSS, SVG, (& JavaScript) Dr. David Koop Assignment 1 Posted on the course web site Due Friday, Feb. 13 Get started soon! Submission information will be posted Useful
By Nabil ADOUI, member of the 4D Technical Support team
XSLT with PHP By Nabil ADOUI, member of the 4D Technical Support team Contents Summary... 3 Introduction... 3 Important elements... 3 The PHP XSL library... 4 The PHP XSL API... 5 XSLTProcessor:: construct...
XSLT Mapping in SAP PI 7.1
Applies to: SAP NetWeaver Process Integration 7.1 (SAP PI 7.1) Summary This document explains about using XSLT mapping in SAP Process Integration for converting a simple input to a relatively complex output.
Enterprise Web Developer : Using the Emprise Javascript Charting Widgets.
Version 4.0.682.2 Background Enterprise Web Developer Using the Emprise Javascript Charting Widgets As of build 4.0.682, Enterprise Web Developer (EWD) includes advanced functionality that allows you to
Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence
Web Development Owen Sacco ICS2205/ICS2230 Web Intelligence Introduction Client-Side scripting involves using programming technologies to build web pages and applications that are run on the client (i.e.
Instructions for Creating a Poster for Arts and Humanities Research Day Using PowerPoint
Instructions for Creating a Poster for Arts and Humanities Research Day Using PowerPoint While it is, of course, possible to create a Research Day poster using a graphics editing programme such as Adobe
Dreamweaver and Fireworks MX Integration Brian Hogan
Dreamweaver and Fireworks MX Integration Brian Hogan This tutorial will take you through the necessary steps to create a template-based web site using Macromedia Dreamweaver and Macromedia Fireworks. The
Using Microsoft Word. Working With Objects
Using Microsoft Word Many Word documents will require elements that were created in programs other than Word, such as the picture to the right. Nontext elements in a document are referred to as Objects
JOOMLA 2.5 MANUAL WEBSITEDESIGN.CO.ZA
JOOMLA 2.5 MANUAL WEBSITEDESIGN.CO.ZA All information presented in the document has been acquired from http://docs.joomla.org to assist you with your website 1 JOOMLA 2.5 MANUAL WEBSITEDESIGN.CO.ZA BACK
Making a Web Page with Microsoft Publisher 2003
Making a Web Page with Microsoft Publisher 2003 The first thing to consider when making a Web page or a Web site is the architecture of the site. How many pages will you have and how will they link to
Microsoft Expression Web Quickstart Guide
Microsoft Expression Web Quickstart Guide Expression Web Quickstart Guide (20-Minute Training) Welcome to Expression Web. When you first launch the program, you ll find a number of task panes, toolbars,
We automatically generate the HTML for this as seen below. Provide the above components for the teaser.txt file.
Creative Specs Gmail Sponsored Promotions Overview The GSP creative asset will be a ZIP folder, containing four components: 1. Teaser text file 2. Teaser logo image 3. HTML file with the fully expanded
WP Popup Magic User Guide
WP Popup Magic User Guide Plugin version 2.6+ Prepared by Scott Bernadot WP Popup Magic User Guide Page 1 Introduction Thank you so much for your purchase! We're excited to present you with the most magical
Developer Tutorial Version 1. 0 February 2015
Developer Tutorial Version 1. 0 Contents Introduction... 3 What is the Mapzania SDK?... 3 Features of Mapzania SDK... 4 Mapzania Applications... 5 Architecture... 6 Front-end application components...
introduces the subject matter, presents clear navigation, is easy to visually scan, and leads to more in-depth content. Additional Resources 10
STYLE GUIDE Style Guide for Course Design Think of your Moodle course page as the homepage of a website. An effective homepage: introduces the subject matter, presents clear navigation, is easy to visually
WebFOCUS BI Portal: S.I.M.P.L.E. as can be
WebFOCUS BI Portal: S.I.M.P.L.E. as can be Author: Matthew Lerner Company: Information Builders Presentation Abstract: This hands-on session will introduce attendees to the new WebFOCUS BI Portal. We will
XSL - Introduction and guided tour
Concepts and Technologies of XML 6.1 XSL - Introduction and guided tour CT-XML 2014/2015 Warning! Authors " João Moura Pires ([email protected]) " With contributions of Carlos Damásio ([email protected])
KOMPOZER Web Design Software
KOMPOZER Web Design Software An IGCSE Student Handbook written by Phil Watkins www.kompozer.net CONTENTS This student guide is designed to allow for you to become a competent user* of the Kompozer web
User Guide for Smart Former Gold (v. 1.0) by IToris Inc. team
User Guide for Smart Former Gold (v. 1.0) by IToris Inc. team Contents Offshore Web Development Company CONTENTS... 2 INTRODUCTION... 3 SMART FORMER GOLD IS PROVIDED FOR JOOMLA 1.5.X NATIVE LINE... 3 SUPPORTED
Joomla Article Advanced Topics: Table Layouts
Joomla Article Advanced Topics: Table Layouts An HTML Table allows you to arrange data text, images, links, etc., into rows and columns of cells. If you are familiar with spreadsheets, you will understand
Creating mobile layout designs in Adobe Muse
Creating mobile layout designs in Adobe Muse Using Adobe Muse, you can create site layouts for web content to be displayed on desktop, smartphones, and tablets. Using the mobile design features, you can
The Essential Guide to HTML Email Design
The Essential Guide to HTML Email Design Index Introduction... 3 Layout... 4 Best Practice HTML Email Example... 5 Images... 6 CSS (Cascading Style Sheets)... 7 Animation and Scripting... 8 How Spam Filters
Chapter 14: Links. Types of Links. 1 Chapter 14: Links
1 Unlike a word processor, the pages that you create for a website do not really have any order. You can create as many pages as you like, in any order that you like. The way your website is arranged and
Web Portal User Guide. Version 6.0
Web Portal User Guide Version 6.0 2013 Pitney Bowes Software Inc. All rights reserved. This document may contain confidential and proprietary information belonging to Pitney Bowes Inc. and/or its subsidiaries
IE Class Web Design Curriculum
Course Outline Web Technologies 130.279 IE Class Web Design Curriculum Unit 1: Foundations s The Foundation lessons will provide students with a general understanding of computers, how the internet works,
Lab 2: Visualization with d3.js
Lab 2: Visualization with d3.js SDS235: Visual Analytics 30 September 2015 Introduction & Setup In this lab, we will cover the basics of creating visualizations for the web using the d3.js library, which
JJY s Joomla 1.5 Template Design Tutorial:
JJY s Joomla 1.5 Template Design Tutorial: Joomla 1.5 templates are relatively simple to construct, once you know a few details on how Joomla manages them. This tutorial assumes that you have a good understanding
Dashboard Skin Tutorial. For ETS2 HTML5 Mobile Dashboard v3.0.2
Dashboard Skin Tutorial For ETS2 HTML5 Mobile Dashboard v3.0.2 Dashboard engine overview Dashboard menu Skin file structure config.json Available telemetry properties dashboard.html dashboard.css Telemetry
Coding HTML Email: Tips, Tricks and Best Practices
Before you begin reading PRINT the report out on paper. I assure you that you ll receive much more benefit from studying over the information, rather than simply browsing through it on your computer screen.
Intro to Web Design. ACM Webmonkeys @ UIUC
Intro to Web Design ACM Webmonkeys @ UIUC How do websites work? Note that a similar procedure is used to load images, etc. What is HTML? An HTML file is just a plain text file. You can write all your HTML
Hypercosm. Studio. www.hypercosm.com
Hypercosm Studio www.hypercosm.com Hypercosm Studio Guide 3 Revision: November 2005 Copyright 2005 Hypercosm LLC All rights reserved. Hypercosm, OMAR, Hypercosm 3D Player, and Hypercosm Studio are trademarks
Terminal Four (T4) Site Manager
Terminal Four (T4) Site Manager Contents Terminal Four (T4) Site Manager... 1 Contents... 1 Login... 2 The Toolbar... 3 An example of a University of Exeter page... 5 Add a section... 6 Add content to
White Paper Using PHP Site Assistant to create sites for mobile devices
White Paper Using PHP Site Assistant to create sites for mobile devices Overview In the last few years, a major shift has occurred in the number and capabilities of mobile devices. Improvements in processor
This document will describe how you can create your own, fully responsive. drag and drop email template to use in the email creator.
1 Introduction This document will describe how you can create your own, fully responsive drag and drop email template to use in the email creator. It includes ready-made HTML code that will allow you to
Blender Notes. Introduction to Digital Modelling and Animation in Design Blender Tutorial - week 9 The Game Engine
Blender Notes Introduction to Digital Modelling and Animation in Design Blender Tutorial - week 9 The Game Engine The Blender Game Engine This week we will have an introduction to the Game Engine build
DESIGN A WEB SITE USING PUBLISHER Before you begin, plan your Web site
Page 1 of 22 DESIGN A WEB SITE USING PUBLISHER Before you begin, plan your Web site Before you create your Web site, ask yourself these questions: What do I want the site to do? Whom do I want to visit
How to create buttons and navigation bars
How to create buttons and navigation bars Adobe Fireworks CS3 enables you to design the look and functionality of buttons, including links and rollover features. After you export these buttons from Fireworks,
Fireworks CS4 Tutorial Part 1: Intro
Fireworks CS4 Tutorial Part 1: Intro This Adobe Fireworks CS4 Tutorial will help you familiarize yourself with this image editing software and help you create a layout for a website. Fireworks CS4 is the
Access 2007 Creating Forms Table of Contents
Access 2007 Creating Forms Table of Contents CREATING FORMS IN ACCESS 2007... 3 UNDERSTAND LAYOUT VIEW AND DESIGN VIEW... 3 LAYOUT VIEW... 3 DESIGN VIEW... 3 UNDERSTAND CONTROLS... 4 BOUND CONTROL... 4
WP Popup Magic User Guide
WP Popup Magic User Guide Introduction Thank you so much for your purchase! We're excited to present you with the most magical popup solution for WordPress! If you have any questions, please email us at
Tutorial: Building a Dojo Application using IBM Rational Application Developer Loan Payment Calculator
Tutorial: Building a Dojo Application using IBM Rational Application Developer Loan Payment Calculator Written by: Chris Jaun ([email protected]) Sudha Piddaparti ([email protected]) Objective In this
Interspire Website Publisher Developer Documentation. Template Customization Guide
Interspire Website Publisher Developer Documentation Template Customization Guide Table of Contents Introduction... 1 Template Directory Structure... 2 The Style Guide File... 4 Blocks... 4 What are blocks?...
understand how image maps can enhance a design and make a site more interactive know how to create an image map easily with Dreamweaver
LESSON 3: ADDING IMAGE MAPS, ANIMATION, AND FORMS CREATING AN IMAGE MAP OBJECTIVES By the end of this part of the lesson you will: understand how image maps can enhance a design and make a site more interactive
Recreate your Newsletter Content and Layout within Informz (Workshop) Monica Capogna and Dan Reade. Exercise: Creating two types of Story Layouts
Recreate your Newsletter Content and Layout within Informz (Workshop) Monica Capogna and Dan Reade Exercise: Creating two types of Story Layouts 1. Creating a basic story layout (with title and content)
Course Information Course Number: IWT 1229 Course Name: Web Development and Design Foundation
Course Information Course Number: IWT 1229 Course Name: Web Development and Design Foundation Credit-By-Assessment (CBA) Competency List Written Assessment Competency List Introduction to the Internet
Interactive Data Visualization for the Web Scott Murray
Interactive Data Visualization for the Web Scott Murray Technology Foundations Web technologies HTML CSS SVG Javascript HTML (Hypertext Markup Language) Used to mark up the content of a web page by adding
Creating Fill-able Forms using Acrobat 8.0: Part 1
Creating Fill-able Forms using Acrobat 8.0: Part 1 The first step in creating a fill-able form in Adobe Acrobat is to generate the form with all its formatting in a program such as Microsoft Word. Then
Introduction to Ingeniux Forms Builder. 90 minute Course CMSFB-V6 P.0-20080901
Introduction to Ingeniux Forms Builder 90 minute Course CMSFB-V6 P.0-20080901 Table of Contents COURSE OBJECTIVES... 1 Introducing Ingeniux Forms Builder... 3 Acquiring Ingeniux Forms Builder... 3 Installing
Building A Very Simple Website
Sitecore CMS 6.5 Building A Very Simple Web Site Rev 110715 Sitecore CMS 6.5 Building A Very Simple Website A Self-Study Guide for Developers Table of Contents Chapter 1 Introduction... 3 Chapter 2 Creating
Team Members: Christopher Copper Philip Eittreim Jeremiah Jekich Andrew Reisdorph. Client: Brian Krzys
Team Members: Christopher Copper Philip Eittreim Jeremiah Jekich Andrew Reisdorph Client: Brian Krzys June 17, 2014 Introduction Newmont Mining is a resource extraction company with a research and development
Create a Google Site in DonsApp
Create a Google Site in DonsApp 1 Google Web Site Interactive. Constructivist. Collaborative. Communities. WHAT IS GOOGLE SITE? With one single click, you can create a website without any knowledge of
Using MindManager 14
Using MindManager 14 Susi Peacock, Graeme Ferris, Susie Beasley, Matt Sanders and Lindesay Irvine Version 4 September 2014 2011 Queen Margaret University 1. Navigating MindManager 14... 3 Tool Bars and
paragraph(s). The bottom mark is for all following lines in that paragraph. The rectangle below the marks moves both marks at the same time.
MS Word, Part 3 & 4 Office 2007 Line Numbering Sometimes it can be helpful to have every line numbered. That way, if someone else is reviewing your document they can tell you exactly which lines they have
SiteBuilder 2.1 Manual
SiteBuilder 2.1 Manual Copyright 2004 Yahoo! Inc. All rights reserved. Yahoo! SiteBuilder About This Guide With Yahoo! SiteBuilder, you can build a great web site without even knowing HTML. If you can
Adobe Dreamweaver CC 14 Tutorial
Adobe Dreamweaver CC 14 Tutorial GETTING STARTED This tutorial focuses on the basic steps involved in creating an attractive, functional website. In using this tutorial you will learn to design a site
Lesson Review Answers
Lesson Review Answers-1 Lesson Review Answers Lesson 1 Review 1. User-friendly Web page interfaces, such as a pleasing layout and easy navigation, are considered what type of issues? Front-end issues.
Participant Guide RP301: Ad Hoc Business Intelligence Reporting
RP301: Ad Hoc Business Intelligence Reporting State of Kansas As of April 28, 2010 Final TABLE OF CONTENTS Course Overview... 4 Course Objectives... 4 Agenda... 4 Lesson 1: Reviewing the Data Warehouse...
1. Tutorial - Developing websites with Kentico 8... 3 1.1 Using the Kentico interface... 3 1.2 Managing content - The basics... 4 1.2.
Kentico 8 Tutorial Tutorial - Developing websites with Kentico 8.................................................................. 3 1 Using the Kentico interface............................................................................
Differences between HTML and HTML 5
Differences between HTML and HTML 5 1 T.N.Sharma, 2 Priyanka Bhardwaj, 3 Manish Bhardwaj Abstract: Web technology is a standard that allow developing web applications with the help of predefined sets of
Creating PDF Forms in Adobe Acrobat
Creating PDF Forms in Adobe Acrobat Flinders University Centre for Educational ICT Contents What are PDF forms?... 1 Viewing a PDF form... 1 Types of PDF forms... 1 Printing and saving PDF forms... 1 Forms
PeopleSoft Query Training
PeopleSoft Query Training Overview Guide Tanya Harris & Alfred Karam Publish Date - 3/16/2011 Chapter: Introduction Table of Contents Introduction... 4 Navigation of Queries... 4 Query Manager... 6 Query
1. To start Installation: To install the reporting tool, copy the entire contents of the zip file to a directory of your choice. Run the exe.
CourseWebs Reporting Tool Desktop Application Instructions The CourseWebs Reporting tool is a desktop application that lets a system administrator modify existing reports and create new ones. Changes to
Beginning Web Development with Node.js
Beginning Web Development with Node.js Andrew Patzer This book is for sale at http://leanpub.com/webdevelopmentwithnodejs This version was published on 2013-10-18 This is a Leanpub book. Leanpub empowers
ADOBE ACROBAT 7.0 CREATING FORMS
ADOBE ACROBAT 7.0 CREATING FORMS ADOBE ACROBAT 7.0: CREATING FORMS ADOBE ACROBAT 7.0: CREATING FORMS...2 Getting Started...2 Creating the Adobe Form...3 To insert a Text Field...3 To insert a Check Box/Radio
Xtreeme Search Engine Studio Help. 2007 Xtreeme
Xtreeme Search Engine Studio Help 2007 Xtreeme I Search Engine Studio Help Table of Contents Part I Introduction 2 Part II Requirements 4 Part III Features 7 Part IV Quick Start Tutorials 9 1 Steps to
Microsoft Excel Tips & Tricks
Microsoft Excel Tips & Tricks Collaborative Programs Research & Evaluation TABLE OF CONTENTS Introduction page 2 Useful Functions page 2 Getting Started with Formulas page 2 Nested Formulas page 3 Copying
Web Design for Programmers. Brian Hogan NAPCS Slides and content 2008 Brian P. Hogan Do not reproduce in any form without permission
Web Design for Programmers Brian Hogan NAPCS Slides and content 2008 Brian P. Hogan Do not reproduce in any form without permission Quick Disclaimers This is a crash course! Many topics are simplified
Interactive Visualization
7th China R Conf (Beijing), 2014-05-25 Interactive Visualization with R 王亮博 (亮亮) shared under CC 4.0 BY Esc to overview to navigate Online slide on http://ccwang002.gitcafe.com/chinarconf-interactive-vis/
NDSU Technology Learning & Media Center. Introduction to Google Sites
NDSU Technology Learning & Media Center QBB 150C 231-5130 www.ndsu.edu/its/tlmc Introduction to Google Sites Get Help at the TLMC 1. Get help with class projects on a walk-in basis; student learning assistants
MCH Strategic Data Best Practices Review
MCH Strategic Data Best Practices Review Presenters Alex Bardoff Manager, Creative Services [email protected] Lindsey McFadden Manager, Campaign Production Services [email protected] 2 Creative
Mail Programming Topics
Mail Programming Topics Contents Introduction 4 Organization of This Document 4 Creating Mail Stationery Bundles 5 Stationery Bundles 5 Description Property List 5 HTML File 6 Images 8 Composite Images
Creating Personal Web Sites Using SharePoint Designer 2007
Creating Personal Web Sites Using SharePoint Designer 2007 Faculty Workshop May 12 th & 13 th, 2009 Overview Create Pictures Home Page: INDEX.htm Other Pages Links from Home Page to Other Pages Prepare
Intro to Excel spreadsheets
Intro to Excel spreadsheets What are the objectives of this document? The objectives of document are: 1. Familiarize you with what a spreadsheet is, how it works, and what its capabilities are; 2. Using
Designing and Implementing Forms 34
C H A P T E R 34 Designing and Implementing Forms 34 You can add forms to your site to collect information from site visitors; for example, to survey potential customers, conduct credit-card transactions,
ADOBE DREAMWEAVER CS3 TUTORIAL
ADOBE DREAMWEAVER CS3 TUTORIAL 1 TABLE OF CONTENTS I. GETTING S TARTED... 2 II. CREATING A WEBPAGE... 2 III. DESIGN AND LAYOUT... 3 IV. INSERTING AND USING TABLES... 4 A. WHY USE TABLES... 4 B. HOW TO
How To Write A Cq5 Authoring Manual On An Ubuntu Cq 5.2.2 (Windows) (Windows 5) (Mac) (Apple) (Amd) (Powerbook) (Html) (Web) (Font
Adobe CQ5 Authoring Basics Print Manual SFU s Content Management System SFU IT Services CMS Team ABSTRACT A summary of CQ5 Authoring Basics including: Setup and Login, CQ Interface Tour, Versioning, Uploading
Portal Connector Fields and Widgets Technical Documentation
Portal Connector Fields and Widgets Technical Documentation 1 Form Fields 1.1 Content 1.1.1 CRM Form Configuration The CRM Form Configuration manages all the fields on the form and defines how the fields
Mobile Web Design with HTML5, CSS3, JavaScript and JQuery Mobile Training BSP-2256 Length: 5 days Price: $ 2,895.00
Course Page - Page 1 of 12 Mobile Web Design with HTML5, CSS3, JavaScript and JQuery Mobile Training BSP-2256 Length: 5 days Price: $ 2,895.00 Course Description Responsive Mobile Web Development is more
XML WEB TECHNOLOGIES
XML WEB TECHNOLOGIES Chakib Chraibi, Barry University, [email protected] ABSTRACT The Extensible Markup Language (XML) provides a simple, extendable, well-structured, platform independent and easily
Contents. Downloading the Data Files... 2. Centering Page Elements... 6
Creating a Web Page Using HTML Part 1: Creating the Basic Structure of the Web Site INFORMATION TECHNOLOGY SERVICES California State University, Los Angeles Version 2.0 Winter 2010 Contents Introduction...
Starting User Guide 11/29/2011
Table of Content Starting User Guide... 1 Register... 2 Create a new site... 3 Using a Template... 3 From a RSS feed... 5 From Scratch... 5 Edit a site... 6 In a few words... 6 In details... 6 Components
KB COPY CENTRE. RM 2300 JCMB The King s Buildings West Mains Road Edinburgh EH9 3JZ. Telephone: 0131 6505001
KB COPY CENTRE RM 2300 JCMB The King s Buildings West Mains Road Edinburgh EH9 3JZ Telephone: 0131 6505001 Email: [email protected] [email protected] [email protected] Step 1. Set up page orientation
Adobe InDesign Creative Cloud
Adobe InDesign Creative Cloud Beginning Layout and Design November, 2013 1 General guidelines InDesign creates links to media rather than copies so -Keep all text and graphics in one folder -Save the InDesign
Software Requirements Specification For Real Estate Web Site
Software Requirements Specification For Real Estate Web Site Brent Cross 7 February 2011 Page 1 Table of Contents 1. Introduction...3 1.1. Purpose...3 1.2. Scope...3 1.3. Definitions, Acronyms, and Abbreviations...3
Appendix H: Cascading Style Sheets (CSS)
Appendix H: Cascading Style Sheets (CSS) Cascading Style Sheets offer Web designers two key advantages in managing complex Web sites: Separation of content and design. CSS gives developers the best of
Interactive HTML Reporting Using D3 Naushad Pasha Puliyambalath Ph.D., Nationwide Insurance, Columbus, OH
Paper DV09-2014 Interactive HTML Reporting Using D3 Naushad Pasha Puliyambalath Ph.D., Nationwide Insurance, Columbus, OH ABSTRACT Data visualization tools using JavaScript have been flourishing recently.
Microsoft Publisher 2010: Web Site Publication
Microsoft Publisher 2010: Web Site Publication Application Note Team 6 Darci Koenigsknecht November 14, 2011 Table of Contents ABSTRACT... 3 INTRODUCTION... 3 KEYWORDS... 3 PROCEDURE... 4 I. DESIGN SETUP...
Creating Web Pages with Netscape/Mozilla Composer and Uploading Files with CuteFTP
Creating Web Pages with Netscape/Mozilla Composer and Uploading Files with CuteFTP Introduction This document describes how to create a basic web page with Netscape/Mozilla Composer and how to publish
WEBSITE CONTENT MANAGEMENT SYSTEM USER MANUAL CMS Version 2.0 CMS Manual Version 1.0 2-25-13
WEBSITE CONTENT MANAGEMENT SYSTEM USER MANUAL CMS Version 2.0 CMS Manual Version 1.0 2-25-13 CONTENTS Things to Remember... 2 Browser Requirements... 2 Why Some Areas of Your Website May Not Be CMS Enabled...
T XML in 2 lessons! %! " #$& $ "#& ) ' */,: -.,0+(. ". "'- (. 1
XML in 2 lessons! :.. 1 Lets start This presentation will answer the fundamental questions: What is XML? How do I use XML? How does it work? What can I use it for, anyway? 2 World Wide Web Consortium (W3C)
Adobe Acrobat 6.0 Professional
Adobe Acrobat 6.0 Professional Manual Adobe Acrobat 6.0 Professional Manual Purpose The will teach you to create, edit, save, and print PDF files. You will also learn some of Adobe s collaborative functions,
Creative Guidelines for Emails
Version 2.1 Contents 1 Introduction... 3 1.1 Document Aim and Target Audience... 3 1.2 WYSIWYG editors... 3 1.3 Outlook Overview... 3 2 Quick Reference... 4 3 CSS and Styling... 5 3.1 Positioning... 5
M-Files Gantt View. User Guide. App Version: 1.1.0 Author: Joel Heinrich
M-Files Gantt View User Guide App Version: 1.1.0 Author: Joel Heinrich Date: 02-Jan-2013 Contents 1 Introduction... 1 1.1 Requirements... 1 2 Basic Use... 1 2.1 Activation... 1 2.2 Layout... 1 2.3 Navigation...
TUTORIAL 4 Building a Navigation Bar with Fireworks
TUTORIAL 4 Building a Navigation Bar with Fireworks This tutorial shows you how to build a Macromedia Fireworks MX 2004 navigation bar that you can use on multiple pages of your website. A navigation bar
Basic tutorial for Dreamweaver CS5
Basic tutorial for Dreamweaver CS5 Creating a New Website: When you first open up Dreamweaver, a welcome screen introduces the user to some basic options to start creating websites. If you re going to
Dreamweaver Tutorial - Dreamweaver Interface
Expertrating - Dreamweaver Interface 1 of 5 6/14/2012 9:21 PM ExpertRating Home ExpertRating Benefits Recommend ExpertRating Suggest More Tests Privacy Policy FAQ Login Home > Courses, Tutorials & ebooks
PaperlessPrinter. Version 3.0. User s Manual
Version 3.0 User s Manual The User s Manual is Copyright 2003 RAREFIND ENGINEERING INNOVATIONS All Rights Reserved. 1 of 77 Table of Contents 1. 2. 3. 4. 5. Overview...3 Introduction...3 Installation...4
Sitecore InDesign Connector 1.1
Sitecore Adaptive Print Studio Sitecore InDesign Connector 1.1 - User Manual, October 2, 2012 Sitecore InDesign Connector 1.1 User Manual Creating InDesign Documents with Sitecore CMS User Manual Page
