Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Wildcards

There are a couple of different wildcard techniques. One of the simplest is to just not specify a type name with the <element> tag, which means that the pattern will match with any parent element. The same can be used with the <target-element> tag, to match all elements within the related elements rather than the specific target element.

The "content" element of the example XML file is modified to include another, new XML element, the BODYQUOTE:

<content>
<title>What is XML?</title>
<body>
	<BODYQUOTE>XML is Extended Markup Language</BODYQUOTE>,
	 a generic language used to generate documents without 
	following predefined element types.
</body>
</content>

Next, a new rule is added to the XSL file that looks for a target-element type of BODYQUOTE, contained within any number of other, unknown elements:

 <rule>
   <element>
       <target-element type="BODYQUOTE"/>
   </element>
         <SPAN font-weight="bold" color="green" font-style="italic">
		<children/>
	   </SPAN>
  </rule>

The result of running this XSL rule on the modified XML file can be seen in the next generated example. In this example, the SPAN style, with the bold, green, italic font is applied to the BODYQUOTE contents.

This article has demonstrated just some of the results that can be accomplished with some simple tags and a fairly simple processor. There are other aspects of XSL that haven't even been covered in this article, such as adding actions to a style, the use of filtering, even adding script to handle dynamic HTML. However, before I close the article, I want to talk about one more aspect of XSL and that is the CSS properties used in the style sheets.

The Root Rule
Add a little style to your XML document with XSL - a Working Example
The CSS Styles


Up to => Home / Authoring / Languages / XSL / Example




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers