ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* XML, XHTML, and HTML export issue with & in URL
@ 2014-08-28 16:20 Rik Kabel
  2014-08-28 18:22 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Rik Kabel @ 2014-08-28 16:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1471 bytes --]

With the following example, the output xml writer fails to properly 
transform & to the html entity & in some urls; \hyphenatedurl works 
fine.

The generated xhtml and html files have this problem as well as more 
issues with the transformation, including what appears to be mistaken 
transformation of < and > to html entities and unbalanced <link> tags.

When a URL without & is used, the problems do not appear.

I used the default export-example.css file, and I assume that the lack 
of interaction in the result reflects the lack of coding for links in 
that file.

This was tested with the 2014-08-27 standalone.

    \setupbackend[export=xmltest.xml,xhtml=xmltest.xhtml,css=export-example.css]
    \setupinteraction[state=start]
    \useURL[avecAmpersand]
    [http://www.mail-archive.com/search?l=ntg-context@ntg.nl&q=Epub]
       [][klik hier]
    \starttext
    \startsubject[title=Fails in xml]
    \startparagraph
       \tex{from}: \from[avecAmpersand]
    \stopparagraph
    \startparagraph
       \tex{goto&[url]}: \goto{klik
    hier}[url(http://www.mail-archive.com/search?l=ntg-context@ntg.nl&q=Epub)]
    \stopparagraph
    \stopsubject
    \startsubject[title=Okay in xml]
    \startparagraph
       \tex{url}: \url[avecAmpersand]
    \stopparagraph
    \startparagraph
       \tex{hyphenatedurl}:
    \hyphenatedurl{http://www.mail-archive.com/search?l=ntg-context@ntg.nl&q=Epub}
    \stopparagraph
    \stopsubject
    \stoptext

-- 
Rik Kabel

[-- Attachment #1.2: Type: text/html, Size: 2801 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: XML, XHTML, and HTML export issue with & in URL
  2014-08-28 16:20 XML, XHTML, and HTML export issue with & in URL Rik Kabel
@ 2014-08-28 18:22 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2014-08-28 18:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 8/28/2014 6:20 PM, Rik Kabel wrote:
> With the following example, the output xml writer fails to properly
> transform & to the html entity &amp; in some urls; \hyphenatedurl works
> fine.
>
> The generated xhtml and html files have this problem as well as more
> issues with the transformation, including what appears to be mistaken
> transformation of < and > to html entities and unbalanced <link> tags.
>
> When a URL without & is used, the problems do not appear.
>
> I used the default export-example.css file, and I assume that the lack
> of interaction in the result reflects the lack of coding for links in
> that file.
>
> This was tested with the 2014-08-27 standalone.
>
>     \setupbackend[export=xmltest.xml,xhtml=xmltest.xhtml,css=export-example.css]
>     \setupinteraction[state=start]
>     \useURL[avecAmpersand]
>     [http://www.mail-archive.com/search?l=ntg-context@ntg.nl&q=Epub]
>        [][klik hier]
>     \starttext
>     \startsubject[title=Fails in xml]
>     \startparagraph
>        \tex{from}: \from[avecAmpersand]
>     \stopparagraph
>     \startparagraph
>        \tex{goto&[url]}: \goto{klik
>     hier}[url(http://www.mail-archive.com/search?l=ntg-context@ntg.nl&q=Epub)]
>     \stopparagraph
>     \stopsubject
>     \startsubject[title=Okay in xml]
>     \startparagraph
>        \tex{url}: \url[avecAmpersand]
>     \stopparagraph
>     \startparagraph
>        \tex{hyphenatedurl}:
>     \hyphenatedurl{http://www.mail-archive.com/search?l=ntg-context@ntg.nl&q=Epub}
>     \stopparagraph
>     \stopsubject
>     \stoptext

fixed in next beta

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-28 18:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-28 16:20 XML, XHTML, and HTML export issue with & in URL Rik Kabel
2014-08-28 18:22 ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).