[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
RE: NullPointerException
Subject: RE: NullPointerException
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 22 May 2002 11:39:32 -0400
|
Norm,
This isn't well-formed because the attribute
test="contains(. ,'<sub>')"
contains in its value the '<' character.
The '<' character is reserved in XML as the open delimiter for a tag, and
can't appear anywhere in content, including attribute values.
Not that this technique would work in any case, for the reasons I just
described in an earlier post. (Accordingly, I'm not unhelpfully telling you
here how you *would* represent that '<' character if you needed to....)
Cheers,
Wendell
At 09:46 PM 5/21/2002, you wrote:
Thanks Wendell,
You are right! FOP NullPointerException errors are extremely
unhelpful. I did try to create the xml page using the command line
parser. This time it complained about that the xml file not being
well-formed, even though the .fo file is. Not sure how that can
happen. If I would remove the code below then every thing is fine. Does
it make any sense to you?
<xsl:template match="node()">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:if test="contains(. ,'<sub>')">
<fo:inline baseline-shift="super" font-size=".75em">
<xsl:text>FOUND SUPER </xsl:text>
</fo:inline>
</xsl:if>
</xsl:copy>
</xsl:template>
Norm
Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> wrote:
>I've seen the NullPointerException as an (extremely unhelpful) error
>message when running FOP end-to-end (straight from input XML through to
>PDF) and there's either a parse error or a stylesheet runtime error. Rather
>than report the error delivered by the parser or processor, FOP just
bags it.
>
>Norm, if this is what's happening to you, try running your transform
>separately from FOP to generate plain XML. You could use a different XSLT
>processor altogether to take advantage of its error messages.
>
>I hope that helps,
>Wendell
>
>At 03:55 AM 5/21/2002, Mike wrote:
>>A NullPointerException is a bug, either in the code you are calling or
>>in your own Java code. As it's occurring in FOP, use the technical
>>support list for the FOP product at Apache.
>>
>>Michael Kay
>>Software AG
>>home: Michael.H.Kay@xxxxxxxxxxxx
>>work: Michael.Kay@xxxxxxxxxxxxxx
>>
>> > -----Original Message-----
>> > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>> > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
>> > normbishop1@xxxxxxxxxxxx
>> > Sent: 21 May 2002 00:13
>> > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>> > Subject: NullPointerException
>> >
>> >
>> > Hello,
>> >
>> > I am using the following to search for any tag containing
>> > '<super>-15</super>' and take appropriate action. I've been
>> > getting NullPointerException.
>> > (org.apache.fop.apps.FOPException:
>> > java.lang.NullPointerException. Java exception occurred in
>> > call to method.)
>> > Don't know where to look for the error?
>
>
>======================================================================
>Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx
>Mulberry Technologies, Inc. http://www.mulberrytech.com
>17 West Jefferson Street Direct Phone: 301/315-9635
>Suite 207 Phone: 301/315-9631
>Rockville, MD 20850 Fax: 301/315-8285
>----------------------------------------------------------------------
> Mulberry Technologies: A Consultancy Specializing in SGML and XML
>======================================================================
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
>
__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/
Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
======================================================================
Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|