xsl-list
[Top] [All Lists]

[xsl] Testing for special characters

2009-01-02 09:36:57
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>