Displaying keyword search results 1 - 6
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 freyo on June 09, 2011 15:52:12 Last update: June 09, 2011 15:52:30
Follow these steps to add a device administrator application to Android, i.e., make the application appear in the "Select device administrators" screen (Settings -> Location & Security -> Select device administrators): Add a receiver in AndroidManifest.xml :
<receiver android:name="android.app.admin.DeviceAd...All elements and attributes listed above are needed. The attribute android:description must be a string resource, not a literal string. The meta-data element points to an XML resource. Create the meta-data resource res/xml/admin_app_resource.xml :
<device-admin xmlns:android="http://schemas.androi...Define values for string resources ( res/values/strings.xml ):
<?xml version="1.0" encoding="utf-8"?> <resourc...
Created by nogeek on November 11, 2010 00:26:08 Last update: November 11, 2010 00:29:43
This one is even more weird: it worked on Windows but failed on Linux, using default tools JDK1.6.0_20 on both. The exception thrown was:
java.lang.RuntimeException: Invalid conversion fro...And the stack trace:
java.lang.RuntimeException: Invalid conversion fro...This was the XSL used:
<?xml version="1.0" encoding="ISO-8859-1"?> <xs...The problem was , DateUtil.java had two getDate methods, one taking long parameter, the other taking a String parameter. And Java's XSLT get confused about which one to use:
import java.util.Date; import java.text.SimpleD...
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 nogeek on November 04, 2010 23:25:57 Last update: November 04, 2010 23:26:59
With this XML file:
<?xml version="1.0" encoding="ISO-8859-1"?> <ev...and this XSL:
<?xml version="1.0" encoding="ISO-8859-1"?> <xs...The output of XSLT is:
A test event Timestamp: 12886515008...You may not want the title string in the output. There are two ways to do this: Limit the apply-templates action with a select attribute:
<xsl:template match="/"> <xsl:apply-templat...Suppress default text node output with an empty template:
<?xml version="1.0" encoding="ISO-8859-1"?> <xs...Reference: http://www.dpawson.co.uk/xsl/sect2/defaultrule.html
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...