Skip to main content

Posts

Showing posts from April, 2005

A Window Into My Work Day

WARNING: Highly technical stuff ahead. Do not proceed without a pocket protector.Here's a good puzzle for you. How do you use a literal quotation mark in quoted XML text in a string wrapped by the same kind of quotation mark in an XPath query?If you say:
comments[text()="There's a 48" door."]The quotation mark after the 48 ends the text quotation, and the final part of the string (" door.",) is unexpected, and causes a syntax error. Simple enough so far, right?A literal quotation mark in an XPath string is NOT automatically escaped to it's character entity to indicate a literal quotation mark. Instead, it's naturally used as part of the XPath code, to break the XPath string.Your first impulse might be to switch quotation mark types. I disdain the switching of quotation mark types. In my opinion, the double quotation mark should always be used to indicate a string quotation, and if it must be escaped, it should be escaped. Some people prefer to u…

Sample Manual

I like to create my web pages in plain text editors. Here's a good template to start a new web page. I like the filename, "index.htm".
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Fun Work</title>
  <style type="text/css">
  /* <![CDATA[ */
   h1{text-align:center;}
  /* ]]> */
  </style>
 </head>
 <body>
  <h1>Fun Work</h1>
 </body>
</html>