|
Subject: Re: [xsl] Help to prevent copying of prefix From: "Schimon Jehudah sch@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Mon, 9 Mar 2026 09:14:41 -0000 |
Technically, it is not a critical concern; yet It certainly be helpful to solve, since the attempts to try to censor XML in favour of a gimped version of XML (HTML5), it appears that internet browsers do not render this XHTML node properly, as it is treated as XML which "browsers" (i.e. spyware) ignore. Interestingly, XMPP chat clients, such as Psi, properly render that node. https://xmpp.org/extensions/xep-0071.xml XEP-0071: XHTML-IM Schimon On Sun, 8 Mar 2026 20:19:02 -0000 "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > That's not true, copy-namespaces="no" would only help to prevent > copying of any other in scope namespaces, but not copying the prefix > of the node itself.B > > -- > Gesendet mit der GMX Mail App > > > Am 08.03.26, 21:08 schrieb "Graydon graydon@xxxxxxxxx" > <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>: I don't know about XSLT > 2.0 off the top of my head but XSLT 3.0 has the > > copy-namespaces option for xsl:copy-of as well as xsl:copy. > > > > <xsl:copy-of select="$summary/xhtml:*" copy-namespaces="no" /> > > > > might do what you want. > > > > -- > > Graydon Saunders | graydonish@xxxxxxxxxxxx > > \xDE\xE6s ofer\xE9ode, \xF0isses sw\xE1 m\xE6g. > > -- Deor ("That passed, so may this.") > > > > On Sun, Mar 08, 2026 at 07:36:58PM +0000, Martin Honnen > > martin.honnen@xxxxxx scripsit: > > > Basically you need to push those nodes through a template that > > > strips the prefix, a copy doesn't allow you to get rid of the > > > prefix. > > > > > > -- > > > Gesendet mit der GMX Mail App > > > > > > > > > Am 08.03.26, 20:29 schrieb "Schimon Jehudah sch@xxxxxxxxxxxx" > > > <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>: > > > > > > Greetings. > > > > > > I am attempting to copy the XHTML content of element atom:summary > > > without the prefix of "xhtml", by declaring the XML Namespace of > > > "xhtml" at the element which contains it. > > > > > > Content > > > ------- > > > > > > <atom:summary type="xhtml"> > > > <xhtml:div> > > > <xhtml:p> > > > We are happy to announce that > > > <xhtml:a href="gemini://syndikate.i2p">Syndikate</xhtml:a> > > > was publicized. > > > <xhtml:p> > > > </xhtml:div> > > > </atom:summary> > > > > > > > > > XSLT > > > ---- > > > > > > <p xmlns="http://www.w3.org/1999/xhtml" class="summary" > > > type="xhtml"> <xsl:copy-of select="$summary/xhtml:*"/> > > > </p> > > > > > > > > > Result > > > ------ > > > > > > <p xmlns="http://www.w3.org/1999/xhtml" class="summary" > > > type="xhtml"> <xhtml:div> > > > <xhtml:p> > > > We are happy to announce that > > > <xhtml:a href="gemini://syndikate.i2p">Syndikate</xhtml:a> > > > was publicized. > > > <xhtml:p> > > > </xhtml:div> > > > </p> > > > > > > > > > Desired result > > > -------------- > > > > > > <p xmlns="http://www.w3.org/1999/xhtml" class="summary" > > > type="xhtml"> <div> > > > <p> > > > We are happy to announce that > > > <a href="gemini://syndikate.i2p">Syndikate</a> > > > was publicized. > > > <p> > > > </div> > > > </p> > > > > > > > > > Note > > > ---- > > > > > > Directive exclude-result-prefixes="xhtml" did not work for me, or > > > I executed it wrongly. > > > > > > I would appreciate any help. > > > > > > > > > Kind reagrds, > > > Schimon > > > > > > > > > > > > XSL-List info and archive > > > EasyUnsubscribe (by email) > > > > > > XSL-List info and archive > EasyUnsubscribe (by email)
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Aw: Re: Aw: [xsl] Help to prevent , Martin Honnen martin | Thread | Re: [xsl] Help to prevent copying o, David Carlisle d.p.c |
| Re: [xsl] Help to prevent copying o, Schimon Jehudah sch@ | Date | Re: [xsl] Help to prevent copying o, David Carlisle d.p.c |
| Month |