Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: How to remove nodes from the XML tree? (advanced) [Thread Next] Re: How to remove nodes from the XML tree? (advanced)To: NULL Date: 5/2/2007 6:23:00 PM Hi M, "M" <m@m...> wrote in message news:eWXaXrOjHHA.4624@T...... > Hi Dimitre, > >> <xsl:template match= >> "*[* and not(descendant::*[not(*) and not(self::bad)])]"/> > > That's very elegant! And works beautifully. > > However, one small caveat.... > > Applied to the following:- > > <a> > <bad/> > </a> > > The stylesheet would return nothing. According to the strict requirement, > that would be correct - although, personally, potentially producing an > essentially non-well-formed document would concern me. Perhaps just a > slight modification... I am always trying to comply maximally to the strict requirements and not to guess and I believe this is to the benefit of everyone involved. Cheers, Dimitre Novatchev > > <xsl:template match="*[* and parent::* and not(descendant::*[not(*) and > not(self::bad)])]"/> > > would at least ensure the root element was re-produced. > > Cheers > M > > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
