[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Testing for special characters

Subject: Testing for special characters
From: "Graeme Kidd" <coolkidd3@xxxxxxxxxxx>
Date: Fri, 2 Jan 2009 14:36:06 -0000
 Testing for special characters
Hi,
I have used Adobe Acrobat to export a PDF as XML and I am wanting to convert it.
Sometime it displays an unordered list like this:


<Sect>
   <P>List: </P>
   <P>Item 1; </P>
   <P>. </P>
   <P>Item 2; </P>
   <P>. </P>
   <P>Item 3; </P>
   <P>. </P>
</Sect>

Which I am trying to convert to this:

<Sect>
   <P>List:</P>
   <UL>
       <LI>Item 1; </LI>
       <LI>Item 2; </LI>
       <LI>Item 3; </LI>
   </UL>
</Sect>

The best I can think of is to check if there is a bullet point then use the previous <P> node. At the moment I am having trouble just checking if there is a bullet point as this doesn't seem to work:
<xsl:if test="P='. '">


I am thinking it might be because it is a special character. I have tried specifying the output as UTF-8
<xsl:output method="xml" indent="yes" encoding="UTF-8" />


But that didn't seem to help, so does anyone else have any ideas?
Thanks


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.