------------------------------

Message: 4
Date: Wed, 07 Jan 2009 13:06:44 -0500
From: Norman Walsh <[email protected]>
Subject: Re: [MarkLogic Dev General] &
To: General Mark Logic Developer Discussion
        <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain

Shannon <[email protected]> writes:
> I understand that in XML and XQuery an ampersand needs to be written
> as &amp;, but I need a constructed node to be output with a literal
> "&" string, but it's being translated into &amp; --
The following tag
> in an XQY prolog:
>
> <object>                              
> <embed flashvars="{concat("zoomifyImagePath=img/",
$filename,
> "&zoomifySplashScreen=0")}"
src="ZoomifyViewer.swf" menu="false"
> pluginspage="http://www.adobe.com/go/getflashplayer";
> type="application/ x-shockwave-flash" width="800"
height="500"
> name="ZoomifyViewer"></ embed>
> </object>
>
> I have tried encoding and escaping.  Please, is there a workaround?

Are you sure that putting the escaped & in there is a problem?

If you send

  <embed
flashvars="zoomifyImagePath=img/someFn&amp;zoomifySplashScreen=0"

to a browser, it should interpret that attribute value as 

  "zoomifyImagePath=img/someFn&zoomifySplashScreen=0"

which is presumably what the plugin wants. If you could persuade the
generated HTML to include

  <embed
flashvars="zoomifyImagePath=img/someFn&zoomifySplashScreen=0"

you'd be relying on quirky parsing at best.

OTOH, maybe what I've just said applyes to XHTML but not HTML. Still,
it might be worth testing...

                                        Be seeing you,
                                          norm

-- 
Norman Walsh
Principal Technologist
Mark Logic Corporation


------------------------------

Message: 5
Date: Wed, 7 Jan 2009 13:56:09 -0500
From: Shannon <[email protected]>
Subject: Re: [MarkLogic Dev General] &
To: General Mark Logic Developer Discussion
        <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes

Norm, you called it.  I had convinced myself it was the problem, but  
as a test, I saved the ouput, changed &amp; to & and reloaded the  
static page and ended up with the same result, so, something's up with  
the plugin.  Thanks for zeroing in on this one.

On Jan 7, 2009, at 1:06 PM, Norman Walsh wrote:

> Shannon <[email protected]> writes:
>> I understand that in XML and XQuery an ampersand needs to be written
>> as &amp;, but I need a constructed node to be output with a
literal
>> "&" string, but it's being translated into &amp;
-- The following tag
>> in an XQY prolog:
>>
>> <object>                             
>> <embed flashvars="{concat("zoomifyImagePath=img/",
$filename,
>> "&zoomifySplashScreen=0")}"
src="ZoomifyViewer.swf" menu="false"
>> pluginspage="http://www.adobe.com/go/getflashplayer";
>> type="application/ x-shockwave-flash" width="800"
height="500"
>> name="ZoomifyViewer"></ embed>
>> </object>
>>
>> I have tried encoding and escaping.  Please, is there a workaround?
>
> Are you sure that putting the escaped & in there is a problem?
>
> If you send
>
>  <embed flashvars="zoomifyImagePath=img/ 
> someFn&amp;zoomifySplashScreen=0"
>
> to a browser, it should interpret that attribute value as
>
>  "zoomifyImagePath=img/someFn&zoomifySplashScreen=0"
>
> which is presumably what the plugin wants. If you could persuade the
> generated HTML to include
>
>  <embed
flashvars="zoomifyImagePath=img/someFn&zoomifySplashScreen=0"
>
> you'd be relying on quirky parsing at best.
>
> OTOH, maybe what I've just said applyes to XHTML but not HTML. Still,
> it might be worth testing...
>
>                                        Be seeing you,
>                                          norm
>
> -- 
> Norman Walsh
> Principal Technologist
> Mark Logic Corporation
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general

In xhtml, according to specs, < > and & (maybe two more) must be escaped in 
attribute values.




      
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to