spacer
Yehuda Shiran August 4, 2001
XML Namespace for Print Templates
Tips: August 2001

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
OpenOffice 3.2 Lands Amid Critical Changes
Red Hat, IBM Firmly in KVM Virtualization Camp
Red Hat Talks Up Open Source Cloud Plans

When you develop a print template, you need to pay attention to the subject of XML namespace. Your behavior elements should all belong to the same namespace. You enforce it by first specifying the namespace on the first HTML line:

<HTML XMLNS:IE>
There is nothing special about the IE namespace name. The following line is also OK:

<HTML XMLNS:FOO>
Then, you need to import default behaviors into the IE namespace:

<?IMPORT NAMESPACE="IE" IMPLEMENTATION="#default">
For each reference to a behavior element, you need to add the namespace as a prefix:

<IE:DEVICERECT ID="page1" CLASS="masterstyle" MEDIA="print">
</IE:DEVICERECT>
Here is HTML code that displays two master pages:

<HTML XMLNS:IE>
<HEAD>
<?IMPORT NAMESPACE="IE" IMPLEMENTATION="#default">
<STYLE TYPE="text/css">
.masterstyle
{ 
    width:8.5in;
    height:11in;
    background:#FFFF99;   
	border-left:1 solid black;
	border-top:1 solid black;
	border-right:4 solid black;
	border-bottom:4 solid black;
    margin:10px;
}
</STYLE>
</HEAD>
<BODY>

<IE:DEVICERECT ID="page1" CLASS="masterstyle" MEDIA="print">
</IE:DEVICERECT>

<IE:DEVICERECT ID="page2" CLASS="masterstyle" MEDIA="print">
</IE:DEVICERECT>

</BODY>
</HTML>
See what the master page looks like. For more information on print templates, go to Column 89, Print Templates, Part I.


People who read this tip also read these tips:

Look for similar tips by subject:


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

webref The latest from WebReference.com Browse >
Are Google's Language Translation Web Services Ready for Prime Time? · Installing and Using Meeplace, the Business Review CMS · Sending an HTML and Plain Text E-newsletter with ASP.NET, Part 2
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Kingston Debuts Power-Saving Memory Upgrades · Web Marketing Tools: What's Your Reputation? · Ecommerce Marketing Tips: Writing Better Copy