Recent Notes

Displaying keyword search results 1 - 10
Created by Fang on November 10, 2011 09:26:12    Last update: November 10, 2011 09:26:12
Syntax highlighted XML schema for JSF 2.0 Application Configuration Resource File ( faces-config.xml ). Almost 3000 lines! <?xml version="1.0" encoding="UTF-8"?> <xsd:sch...
Created by meiu on February 09, 2010 03:26:14    Last update: March 31, 2011 09:00:19
Simple JDBC code for Oracle. import java.sql.*; public class JDBCHelloWo...
Created by nogeek on November 04, 2010 20:00:15    Last update: November 05, 2010 14:38:43
Following are some bugs in the Xalan jar shipped with JBoss 5.1.0 GA and JBoss 6.0. The Xalan jar file is located in jboss-5.1.0.GA/lib/endorsed ( %JBOSS_HOME%/common/lib for JBoss 6.0). Test xml: <?xml version="1.0" encoding="ISO-8859-1"?> ... Test xsl: <?xml version="1.0" encoding="ISO-8859-1"?> <xs... XSLT Java code: import org.w3c.dom.*; import javax.xml.parsers.... DateUtil.java import java.util.Date; public class DateUti... XSLT output: Transformer Factory class: class org.apache.xalan.... Apparently, the output is wrong. The string "A test event" should not have been displayed.
Created by Fang on August 24, 2010 18:44:24    Last update: August 24, 2010 18:44:24
The tags XML transform tags apply XSLT to XML documents. The XML document may be specified as the doc attribute or enclosed as the body of the <x:transform> tag. Optional <x:param> tags may be used to specify parameters for the XSLT. <x:transform> Syntax: <x:transform doc="XMLDocument" xslt="XSLTStyle... or, include the XML document in the body: <x:transform xslt="XSLTStylesheet" [docSystem... Attributes: Name Dynamic? Type Description doc true String , Reader , javax.xml.transform.Source , org.w3c.dom.Document , or object exported by <x:parse> , <x:set> . Source XML document to be transformed. (If exported by <x:set> , it must correspond to a well-formed XML document, not a partial document.) xslt true String , Reader or javax.xml.transform.Source Transformation stylesheet as a String , Reader , or Source object. docSystemId true...
Created by Fang on August 19, 2010 18:32:28    Last update: August 19, 2010 18:32:28
The tags <x:parse> Parses an XML document. The document to be parsed can be specified by the doc attribute or enclosed as the body of the tag. The parsed document is exposed as the var attribute or the varDom attribute. When exposed as var , the type of the exposed object is implementation dependent; when exposed as varDom , the type of the exposed object is org.w3c.dom.Document . Objects exposed by var and varDom can both be used to set the context of an XPath expression. Syntax: <x:parse doc="XMLDocument" {var="var" [sco... or, put the XML document in the element body: <x:parse {var="var" [scope="page|request|s... Attributes: Name Dynamic? Type Description doc true String , Reader Source XML document to be parsed. systemId true String The...
Created by Dr. Xi on June 20, 2010 14:35:17    Last update: June 20, 2010 14:35:17
This XML signature validator comes from the Apache XML Security project. It validates the signature according to the core validation processing rules . It does not verify that the key used to generate the signature is a trusted key. You can override the KeySelector class to make sure that the signing key is from a trusted store. import javax.xml.crypto.*; import javax.xml.cry...
Created by Dr. Xi on February 24, 2010 21:13:05    Last update: February 24, 2010 21:19:54
This program demonstrates the use of the java.nio package to implement a single thread echo server. import java.io.IOException; import java.net.Ine...
Created by Dr. Xi on January 07, 2010 23:40:28    Last update: February 09, 2010 03:24:35
This is a utility to generate SQL insert statements for Oracle for one table, or a set of tables. It doesn't cover all possibilities but should be good enough for most cases. import java.io.*; import java.sql.*; import ... To generate insert statements for multiple tables, simply put the table names in a file, one per line, and use the -f switch.
Created by Dr. Xi on January 07, 2010 23:56:00    Last update: January 07, 2010 23:56:00
This is a utility that generates a script to grant privileges for an existing schema for Oracle. import java.io.*; import java.sql.*; pub...
Created by Dr. Xi on January 07, 2010 23:51:44    Last update: January 07, 2010 23:53:57
This is a utility to generate a "create synonym" script for Oracle for an existing schema. import java.io.*; import java.sql.*; pub...
Previous  1 2 Next