Subject: Re: [xsl] Finding an element without a particular attribute? From: "Wendell Piez wapiez@xxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 28 Mar 2025 17:13:54 -0000 |
Hello, Except for at the top, in this model, 'map[not(@key)]' (or 'map[empty(@key)]' if you like) happens to coincide with 'array/map'. This is due to a property of JSON, namely that map properties (of any type) have keys, but not array members (of any type). If this is obvious or intrusive to note, please forgive the noise. Cheers, Wendell On Fri, Mar 28, 2025 at 12:39b/PM David Carlisle d.p.carlisle@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > On Fri, 28 Mar 2025 at 16:30, dvint@xxxxxxxxx < > xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > >> I'm processing content produced with json-to-xml(). So there are a buch >> of <map> elements. Many have the @key attribute and are easy to match. >> I'm drawing a blank on how to find map elements without the @key. >> >> <map key="mime"> >> <string key="type">array</string> >> <array key="items"> >> <map> >> <string key="type">string</string> >> </map> >> </array >> </map> >> <map key="uri"> >> <string key="type">string</string> >> </map> >> <map key="doctype"> >> <string key="type">string</string> >> </map> >> >> >> Any thoughts? I tried map[@key=''] with no luck. >> > > map[not(@key)] > > >> >> ..dan >> >> >> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list> > EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/174322> (by > email <>) > -- ...Wendell Piez... ...wendell -at- nist -dot- gov... ...wendellpiez.com... ...pellucidliterature.org... ...pausepress.org... ...github.com/wendellpiez... ...gitlab.coko.foundation/wendell...
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Finding an element withou, David Carlisle d.p.c | Thread | Re: [xsl] Finding an element withou, Pieter Masereeuw pie |
Re: [xsl] Finding an element withou, David Carlisle d.p.c | Date | Re: [xsl] Finding an element withou, Pieter Masereeuw pie |
Month |