xsl-list
[Top] [All Lists]

RE: [xsl] global filter

2013-08-12 08:48:37
Hi Geert,

This might work for you:

<xsl:template match="*[@audience='restricted']" priority="10"><!-- suppress 
--></xsl:template>

This should suppress any element with attribute audience='restricted'. Increase 
the priority if you have other templates that use priority 10. 

Vincent


-----Original Message-----
From: Geert Bormans [mailto:geert(_at_)gbormans(_dot_)telenet(_dot_)be] 
Sent: Monday, August 12, 2013 9:36 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] global filter

Hi all,

Was wondering today if this would be the best approach...

I have an XML that could have an audience="restricted" on each an every 
element, and depending on a global parameter, I want to filter out all of the 
restricted content in my processing.

I would assume that if I had a common catch all template with a very high 
priority, the process would always go there first, and I only need one template 
with the filter logic.
next-match would then allow me to do the actual processing (if not restricted) 
Seems like a use case for next-match, no?

I could actually have the same effect more or less if I had only one template 
without a mode, and had all the other templates in a mode Is that correct, or 
am I overlooking something?

Just wondering what the best approach would be in a filter that is allowed on 
each and every element

Thanks

Geert


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


<Prev in Thread] Current Thread [Next in Thread>