From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/88584 Path: news.gmane.org!not-for-mail From: Rik Kabel Newsgroups: gmane.comp.tex.context Subject: XML, XHTML, and HTML export issue with & in URL Date: Thu, 28 Aug 2014 12:20:46 -0400 Message-ID: <53FF56DE.9020602@rik.users.panix.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1080091281==" X-Trace: ger.gmane.org 1409242876 7437 80.91.229.3 (28 Aug 2014 16:21:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Aug 2014 16:21:16 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Aug 28 18:21:11 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XN2Rf-0003Dy-Nw for gctc-ntg-context-518@m.gmane.org; Thu, 28 Aug 2014 18:21:07 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8318C1021B for ; Thu, 28 Aug 2014 18:21:07 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id W7jAQix0OF7d for ; Thu, 28 Aug 2014 18:21:07 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 7CB8C1021F for ; Thu, 28 Aug 2014 18:20:59 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B5D99101E3 for ; Thu, 28 Aug 2014 18:20:56 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id SaUbh56W4NwU for ; Thu, 28 Aug 2014 18:20:52 +0200 (CEST) Original-Received: from filter3-utr.mf.surf.net (filter3-utr.mf.surf.net [195.169.124.154]) by balder.ntg.nl (Postfix) with ESMTP id C66C5101E1 for ; Thu, 28 Aug 2014 18:20:52 +0200 (CEST) Original-Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by filter3-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s7SGKpGp019569 for ; Thu, 28 Aug 2014 18:20:51 +0200 Original-Received: from [192.168.9.122] (pool-71-183-246-109.nycmny.fios.verizon.net [71.183.246.109]) by mailbackend.panix.com (Postfix) with ESMTP id A69F52E0C6 for ; Thu, 28 Aug 2014 12:20:50 -0400 (EDT) User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=166.84.1.89; country=US; region=New York; city=Richmond Hill; latitude=40.7005; longitude=-73.8345; http://maps.google.com/maps?q=40.7005,-73.8345&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 08MIgkP1i - 5dbf0cee0250 - 20140828 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.154 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:88584 Archived-At: This is a multi-part message in MIME format. --===============1080091281== Content-Type: multipart/alternative; boundary="------------090801080101040905020803" This is a multi-part message in MIME format. --------------090801080101040905020803 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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 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 --------------090801080101040905020803 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=3Dxmltest.xml,xhtml=3Dxmltest.xh= tml,css=3Dexport-example.css]
\setupinteraction[state=3Dstart]
\useURL[avecAmpersand]
=C2=A0 [http://www.mail-archiv= e.com/search?l=3Dntg-context@ntg.nl&q=3DEpub]
=C2=A0 [][klik hier]
\starttext
\startsubject[title=3DFails in xml]
\startparagraph
=C2=A0 \tex{from}: \from[avecAmpersand]
\stopparagraph
\startparagraph
=C2=A0 \tex{goto&[url]}: \goto{klik hier}[url(http://www.mail-archi= ve.com/search?l=3Dntg-context@ntg.nl&q=3DEpub)]
\stopparagraph
\stopsubject
\startsubject[title=3DOkay in xml]
\startparagraph
=C2=A0 \tex{url}: \url[avecAmpersand]
\stopparagraph
\startparagraph
=C2=A0 \tex{hyphenatedurl}: \hyphenatedurl{http://www.mail-= archive.com/search?l=3Dntg-context@ntg.nl&q=3DEpub}
\stopparagraph
\stopsubject
\stoptext
--
Rik Kabel
--------------090801080101040905020803-- --===============1080091281== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============1080091281==--