[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 13:37:09 -0400
fo inline nullpointerexception
Norm:

Maybe I'm completely confused here but if your source has:

<paragraph>This is some text <sub>including some subscripted text</sub> and then some more text</paragraph>

what you want is as simple as

<xsl:template match="paragraph">
  <fo:block>
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<xsl:template match="sub">
  <fo:inline baseline-shift="sub">
    <xsl:apply-templates/>
  </fo:inline>
</xsl:template>

with adjustments for your target language (e.g. you haven't actually said you are targetting FO, I just guessed).

Now if your source has something more like

<paragraph>This is some text & l t ; sub & g t ; including some subscripted text & l t ; /sub & g t ; and then some more text</paragraph>

(Note I've introduced extra spaces to work around broken email clients that don't tolerate honest code.)

Then things are harder, since what you need is a string-processing language, and XSLT isn't designed for that. (You'd have to walk on your hands to do it.)

Which is your case?

Sorry to be a nuisance if I haven't understood (yet).

Regards,
Wendell


At 01:04 PM 5/22/2002, you wrote:



I did go through the xpath tutorial and I understand that well now. but, that does not help solve my problem. What I am trying to do is to find a way to do subscript and superscript of some text data. The node search code I mailed earlier does contain the proper &lt and &gt followed by a semicolon. ( the email system I am using is converting &lt to < and &gt to :( ). I am soooo lost and need your help very badly.

The string "<sub>" is not an attribute. It is a value of an element. OK! just forget what I have done. Pls tell me a way to do a subscript/superscript!!!!

THANK YOU

Norm



__________________________________________________________________
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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.