ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* XML-processing: Error with hyphenatedurl
@ 2021-10-27 13:03 Denis Maier via ntg-context
  2021-10-27 13:43 ` Pablo Rodriguez via ntg-context
  0 siblings, 1 reply; 6+ messages in thread
From: Denis Maier via ntg-context @ 2021-10-27 13:03 UTC (permalink / raw)
  To: ntg-context; +Cc: denis.maier


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

Hi,

I've receiving errors that seem to be related to hyphenatedurl. The problem is I cannot really reproduce it in a MWE. The example below works, but if I include the link in my real document, I'am getting this error message (copied from -error.log):

%%%%%%%%%%%%%%%%%%%%%
return {
["errortype"]=1,
["filename"]="",
["lastcontext"]="\n<to be read again> \n    \n    \\xdef<file://xdef> \n<macro> \\expanded<file://expanded> \n    #1->\\xdef<file://xdef> \n    \\m_syst_helpers_expanded<file://m_syst_helpers_expanded> {\\noexpand #1}\\m_syst_helpers_expanded \n<macro> \\22>:xml:ext-link<file://22%3e:xml:ext-link> \n    #1->\\begingroup<file://begingroup> \\expandUx<file://expandUx> \\expanded<file://expanded> \n    {\\goto {\\hyphenatedurl {\\xmlflush {#1}}}[url(\\xmlflush<file://xmlflush> {#1})]}\\endgroup \n<lua output> \n<macro> \\22>:xml:p<file://22%3e:xml:p> \n    #1->\\begingroup<file://begingroup> \\xmlfilter<file://xmlfilter> {#1}{.[@xml:lang]/command(xml:language)}\\xmlflush {#1}\n    \\endgroup<file://endgroup> \\par<file://par> \n<lua output> \n ...\n\n<initial> \n    \n\n",
["lastluaerror"]="",
["lasttexerror"]="Missing number, treated as zero",
["lasttexhelp"]="A number should have been here; I inserted '0'. (If you can't figure out why I\nneeded to see a number, look up 'weird error' in the index to The TeXbook.)",
["linenumber"]=9,
["offset"]=10,
["skiplinenumber"]=5,
}
%%%%%%%%%%%%%%%%%%%%

Two things seemed to make it work:
1. Remove the link.
2. Comment out \expandUx in this setup:

%%%%%%%%%%%%%%%%%%%%
\startxmlsetups xml:ext-link
    \begingroup
        \expandUx % commenting this out makes it work
                               \expanded{\goto{\hyphenatedurl{\xmlflush{#1}}}[url(\xmlflush{#1})]}
    \endgroup
\stopxmlsetups
%%%%%%%%%%%%%%%%%%%%


Best,
Denis


%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setupinteraction[state=start]

\startxmlsetups xml:test
    \xmlsetsetup{#1}{*}{-}
    \xmlsetsetup{#1}{article|ext-link}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:test}

\startxmlsetups xml:article
\starttext
    \xmlflush{#1}
\stoptext
\stopxmlsetups

\startxmlsetups xml:ext-link
    \begingroup
        \expandUx
                               \expanded{\goto{\hyphenatedurl{\xmlflush{#1}}}[url(\xmlflush{#1})]}
    \endgroup
\stopxmlsetups

\startbuffer[test]
<?xml version="1.0" encoding="utf-8" ?>
<article>

asdf

<ext-link ext-link-type="uri" xlink:href="asdf">asdf</ext-link>

</article>
\stopbuffer

\xmlprocessbuffer{test}{test}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


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

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2021-10-27 16:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-27 13:03 XML-processing: Error with hyphenatedurl Denis Maier via ntg-context
2021-10-27 13:43 ` Pablo Rodriguez via ntg-context
2021-10-27 14:30   ` Denis Maier via ntg-context
2021-10-27 15:37     ` Denis Maier via ntg-context
2021-10-27 16:19       ` Pablo Rodriguez via ntg-context
2021-10-27 16:37       ` Hans Hagen via ntg-context

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).