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

Processing Entity ' question

Subject: Processing Entity ' question
From: "Greg Alvord" <Greg.Alvord@xxxxxxxxxxx>
Date: Sat, 5 Feb 2005 16:58:16 -0600
apos entity
I have been pulling what is left of my hair out this morning.  I hate to
bother this group with such a simple question.  I have looked in books and
at FAQ

Problem:  An XML element content has a single quote in it, as in "Broker's
ZIP".  In the file is it properly represented with  an internal entity.  The
XML looks like <LogicalFieldName>Broker&apos;s ZIP</LogicalFieldName>

The <xsl:output> is set to text.  I am writing SQL statements from the XML.
In Oracle to represent the single quote as content you use three single
quotes. For example

WHERE FLDNAME=' Broker'''s ZIP'.

I can not find the construction that will let me detect the existence of the
single quite.

Assume
<xsl:varable name=myValue select="Broker&apos;s ZIP"/>

The value is really pulled from the source document.  Showing the variable
content in StylusStudio debug shows the single quote is there. 

This construction works to find the 'r'
<xsl:if test="string-length(string-before($myValue,'r'))>0">

I have tried
<xsl:if test="string-length(string-before($myValue,'''))>0">   --- quoted
quote
and
<xsl:if test="string-length(string-before($myValue,'&apos;'))>0">  quoted
entity
and
<xsl:if test="string-length(string-before($myValue,'&#39;'))>0"> quoted
character encode

In each case it acts like there are missing end parenthesis, no doubt
because the odd number of single quotes act like one quote.  

Any ideas?

Greg

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.