Image of Advanced Programming in the UNIX Environment, Second Edition (Addison-Wesley Professional Computing Series)
Image of Operating System Concepts
Image of Android Wireless Application Development
Image of XSLT 2.0 and XPath 2.0 Programmer's Reference (Programmer to Programmer)

XSLT Namespace Handling

This post assumes that you are familiar with XML, XSLT and XPath. It shows two methods to handle multiple default namespaces using XSLT1.0 and another method using XSLT2.0. Consider the following simple XML document: <Month xmlns="urn:murphy/ws/account/10/2007"> <LastPage>true</LastPage> <Accounts xmlns="urn:murphy/xml/account"> <Account> <AccountId>6289-F891T</AccountId> <Owner>6DS</Owner> <AccountType>Customer</AccountType> <Country>Philippines</Country> <SalesPerson>Joe Goon</SalesPerson> </Account> <Account> <AccountId>7142-J219F</AccountId> <Owner>IISC</Owner> <AccountType>Customer</AccountType> <Country>Canada</Country> <SalesPerson>Sarah Cergeo</SalesPerson> </Account> </Accounts> </Month> As you can see it has two namespaces, i.e urn:murphy/ws/account/10/2007 and urn:murphy/xml/account. The requirement is to transform this input document into the following output document using a stylesheet: <?xml version="1.0"?> <Month xmlns="urn:murphy/ws/account/10/2007"> <LastPage>true</LastPage> <Accounts xmlns="urn:murphy/xml/account"> <Account> <AccountId>6289-F891T</AccountId> <SalesPerson>Joe Goon</SalesPerson> </Account> <Account> <AccountId>7142-J219F</AccountId> <SalesPerson>Sarah

Adding Discrete Height Selection to Boonex Dolphin

Boonex’s Dolphin is a popular PHP/MySQL-based community software package which has been around for a number of years. It’s roots go back nearly 10 years to aeWebWorks and AEdating. As part of each user’s profile, it includes the ability to store a user’s height. Unfortunately the granularity of the select box options for a user’s height is poor. Here is the relevant part of the MySQL load script which sets up the user height selection values: INSERT INTO `sys_pre_values` VALUES(‘Height’, ‘1’, 1, ‘__4”7″ (140cm) or below’, ”, ”, ”, ”, ”); INSERT INTO `sys_pre_values` VALUES(‘Height’, ‘2’, 2, ‘__4”8″ – 4”11″