Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - [XSLT] How to establish a context node without [Thread Next] Re: [XSLT] How to establish a context node without To: NULL Date: 11/17/2008 11:21:00 AM In article <gfrdkf$itq$1@n...>,
Hoi Wong <wonghoi@s...> wrote:
>Instead of specifying document('rpt_pat.xml') every time using absolute
>paths, I could have used <xsl:for-each select=document('rpt_pat.xml')>.
>However, I'd like to avoid using this syntax because there's only one
>instance of document('rpt_pat.xml') node. Using <xsl:for-each> can lead to
>whoever that reads my XSLT scripts into thinking that there are multiple
>instances of the document('rpt_pat.xml') node, adding confusion to the
>already huge chaos.
Apply-templates and for-each are the only constructs that let you change
the context node.
I recommend using for-each with a comment to indicate that its only
purpose is to set the context.
-- Richard
--
Please remember to mention me / in tapes you leave behind.
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
