Subject: Re: [xsl] Algorithm akin to namespace fixup for xslt? From: "Wendell Piez wapiez@xxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 6 Feb 2015 22:36:28 -0000 |
Hi Alan, One's idea of "namespace fixup" will vary :-), but see https://github.com/wendellpiez/XMLNamespaceFixup Cheers, Wendell On Fri, Feb 6, 2015 at 5:26 AM, Alan Painter alan.painter@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Dr Kay, > > That gives me something new to try which looks good. I'm not entirely sure > about xsl:mode with 9.1 saxonica as it is not something I've used before and > I'm just reading about it. > > Thanks for working through my sketchy details and borked post reply. > > Very Best Regards > > Given a deep tree of nodes, each element node within a namespace. A child > node inherits its parent namespace unless it specifically overrides it. Is > there an algorithm for choosing the "best" or perhaps "sparsest" set of > overriding namespace declarations, hence taking the most advantage of > inheritance. > > My application of this algorithm isn't for namespaces but seems very similar > in requirement. > > > That's a pretty sketchy description, not helped by the fact that you > appended text from another thread which I assume is to be ignored. > > Let's try another formulation, which might or might not be what you > intended: Given a document with lots of xml:lang attributes, eliminate those > that are redundant. > > That one's fairly easy, I think: > > <xsl:mode on-no-match="shallow-copy"/> > <xsl:template match="@xml:lang[. eq ancestor::*[@xml:lang][1]/@xml:lang"/> > > Michael Kay > Saxonica > > XSL-List info and archive > EasyUnsubscribe (by email) > XSL-List info and archive > EasyUnsubscribe (by email) -- Wendell Piez | http://www.wendellpiez.com XML | XSLT | electronic publishing Eat Your Vegetables _____oo_________o_o___ooooo____ooooooo_^
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Algorithm akin to namespa, Alan Painter alan.pa | Thread | Re: [xsl] Algorithm akin to namespa, Wendell Piez wapiez@ |
Re: [xsl] Performance of predicate-, Wendell Piez wapiez@ | Date | Re: [xsl] Algorithm akin to namespa, Wendell Piez wapiez@ |
Month |