extension function help

I'm trying to pass a dateTime string into java and perform a transformation on it.
However, I'm currently stuck on trying to create the date. Having problems escaping the data correctly... If I go:

<xsl:variable name="pattern" select="'yyyy-MM-dd\&apos;T\&apos;HH:mm:ss'"/>
<xsl:value-of select="simpledate:new($pattern)"
xmlns:parseposition="java:java.text.ParsePosition"
xmlns:simpledate="java:java.text.SimpleDateFormat"
xmlns:date="java:java.util.Date"/>

Error at xsl:value-of on line 15 of file:/C:/xslt/javascrapper.xslt:
Exception in extension function java.lang.IllegalArgumentException: Illegal pattern character 'p'

however, if I change pattern to:
'yyyy-MM-dd\'T\'HH:mm:ss'
I get:
Error at xsl:variable on line 8 of file:/C:/xslt/javascrapper.xslt:
Error in expression 'yyyy-MM-dd\'T\'HH:mm:ss': Unexpected token <name> beyond
end of expression

if I change to using double quotes:
'yyyy-MM-dd\"T\"HH:mm:ss'
Error at xsl:value-of on line 15 of file:/C:/xslt/javascrapper.xslt:
Exception in extension function java.lang.IllegalArgumentException: Illegal pattern character 'T'

What is the correct way to pass the single quotes inside a string in??
"yyyy-MM-dd\'T\'HH:mm:ss" is the string wanted to be passed into JAVA.
[1470 byte] By [jkmyoung] at [2007-11-19 2:37:08]
# 1 Re: extension function help
I think that your problem may lay somewhere else. Try this:<xsl:variable name="pattern" select="'yyyy-MM-ddTHH:mm:ss'"/>
Mr. Tomaszek at 2007-11-10 3:27:55 >
# 2 Re: extension function help
that was the first thing I tried; I get Illegal pattern character 'T'.

T must be surrounded by single quotes!
jkmyoung at 2007-11-10 3:28:56 >
# 3 Re: extension function help
OK - maybe I've overshoot something. I remember, that I've similar problem during development of application in MFC7. Unfortunatelly I'm not at my workplace now. So, I cannot check the source code. I'll try to find some info for you tomorow morning (GMT+1). If so, I'm gonna post it.
Mr. Tomaszek at 2007-11-10 3:29:54 >
# 4 Re: extension function help
Sorry, I've checked the code and I were using CCYY-MM-DDThh:mm:ss format.

Hope you gonna find the solution.
Mr. Tomaszek at 2007-11-10 3:30:53 >