From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/109466 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christoph Reller Newsgroups: gmane.comp.tex.context Subject: XML Namespaces and XML Setups Date: Mon, 16 Nov 2020 14:31:05 +0100 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4085503389836268399==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35362"; mail-complaints-to="usenet@ciao.gmane.io" To: ntg-context Original-X-From: ntg-context-bounces@ntg.nl Mon Nov 16 14:36:45 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1keegW-00096w-W6 for gctc-ntg-context-518@m.gmane-mx.org; Mon, 16 Nov 2020 14:36:45 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 0D1E61AA2E9; Mon, 16 Nov 2020 14:31:25 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id K8BTSe4czTK0; Mon, 16 Nov 2020 14:31:24 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 39ABB1AA2ED; Mon, 16 Nov 2020 14:31:24 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 773D81AA2E9 for ; Mon, 16 Nov 2020 14:31:23 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6bmc5Uo2gnCf for ; Mon, 16 Nov 2020 14:31:22 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.167.53; helo=mail-lf1-f53.google.com; envelope-from=christoph.reller@gmail.com; receiver= Original-Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id D9AF61AA2E6 for ; Mon, 16 Nov 2020 14:31:22 +0100 (CET) Original-Received: by mail-lf1-f53.google.com with SMTP id w142so25096488lff.8 for ; Mon, 16 Nov 2020 05:31:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=x3af68glusj0lsnG4TIeORSqj2vCbHlb/L7i4n+UrcQ=; b=rDeXhBnCvlxv1gt7qqoT2SSy524FF0OkZGNMRy9ZwaLdwgtaP/PwQY5XB5pA4umZF+ SmbLQGGbsUpdYG9C3ekZmmApCMwjZ4sW+mGz1Zx6WvCPOdzfkjVpn5UavTZBHnf5REPR ZmCOf4721HiXo/ikfXsx5Z7iiyoIp/56n2nexVB5p0UWrPn6JbIQnOyvFTWUf9teR9ko mZxublmiA0Ri+4n9hMgbJCp6CfJvYryctpZ6/iyGOR7ykLFKOgmP7u+V3pqXDFiiprnC vUbo08U4gF7R86LGQhqYpmTfLtsqQ8V8gIgRWZM8RtXzLGS+3Hw11uuAOWAbqVNQ0pls qRCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=x3af68glusj0lsnG4TIeORSqj2vCbHlb/L7i4n+UrcQ=; b=PmweDWubnH7W0L0TKsSnZng97UdEbWOi9WVHmU6uXA1uFInxAryucZo0BaGKzLcgJE 8xbDR1nYQbln3AjdkdppNZs9eF5ptdNJOtM7s7lH0JsZol6jWMEBFbhrXt15PkwoJuwx 4IHvSZxkqFRpiZnD3wITXU/V6qdzGoFZ3IshhC9KKhlYddQFLA4XrPjomlYDnb/ic8RB TQtGscvgSXNxFkwym+cMR2wHfB+dXUd02wcmE+LGg6oYxAccMJmieQqX1m/AMfj7bFTi BtA83VnbM7gXHuW5dIznZTAV69ugU9sHZZFRF0XwJzkyEhhsLam12Z2rzggwiwT6iN94 2i4Q== X-Gm-Message-State: AOAM530DViTkl4ZuDbFefdniA849UrgRT5k4MawRRLwu0fYr+JhJ+8W+ udysV2NIOFy5F3AGFIWjtesKix0sW+vGsGtCboxbjhs/wwo= X-Google-Smtp-Source: ABdhPJy7Gk3lH67GDTiBC26GhCeMWxAcV0dz9axo7hTnuz+kycOE5vz3nyunR2fqsy/JJpi8exfeNGPwCpvS6yXvx0k= X-Received: by 2002:a19:e04:: with SMTP id 4mr5193168lfo.193.1605533481544; Mon, 16 Nov 2020 05:31:21 -0800 (PST) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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" Xref: news.gmane.io gmane.comp.tex.context:109466 Archived-At: --===============4085503389836268399== Content-Type: multipart/alternative; boundary="000000000000d7b02805b4396488" --000000000000d7b02805b4396488 Content-Type: text/plain; charset="UTF-8" Dear List, Consider the following MWE: \startxmlsetups xml:demo:base \xmlsetsetup{#1}{tag}{xml:demo:tag} \stopxmlsetups \xmlregisterdocumentsetup{demo}{xml:demo:base} \startxmlsetups xml:demo:tag %\doif{\xmlnamespace{#1}}{o}{NameSpaceO:} \xmlflush{#1} \stopxmlsetups \starttext \startbuffer[test] text text \stopbuffer \xmlprocessbuffer{demo}{test}{} \stoptext My questions: - Is there a good way to have a separate XML setup for each XML namespace? - Alternatively, one has to do the distinction within the same XML setup. In this case, how do we get the complete namespace? (In this example: "NameSpaceA" and "NameSpaceO") Thanks in advance for your help! Cheers, Christoph --000000000000d7b02805b4396488 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Dear List,

Consider the following MWE:<= /div>

\startxmlsetups xml:demo:base
=C2=A0 \xmlsetset= up{#1}{tag}{xml:demo:tag}
\stopxmlsetups
\xmlregisterdocumentsetup{de= mo}{xml:demo:base}
\startxmlsetups xml:demo:tag
=C2=A0 %\doif{\xmlnam= espace{#1}}{o}{NameSpaceO:}
=C2=A0 \xmlflush{#1}
\stopxmlsetups
\s= tarttext
\startbuffer[test]
<?xml version=3D"1.0"?><root xmlns=3D"NameSpaceA"
=C2=A0 =C2=A0 =C2=A0 xmlns:o= =3D"NameSpaceO">
=C2=A0 <tag>text</tag> <o:t= ag>text</o:tag>
</root>
\stopbuffer
\xmlprocessbuff= er{demo}{test}{}
\stoptext

My questions:
- Is there a good way to have a=C2=A0separate=C2=A0XML setup for ea= ch XML namespace?
- Alternatively, one has to do the distinction = within the same XML setup. In this case, how do we get the complete namespa= ce? (In this example: "NameSpaceA" and "NameSpaceO")

Thanks in advance for=C2=A0your help!

=
Cheers, Christoph
--000000000000d7b02805b4396488-- --===============4085503389836268399== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============4085503389836268399==--