|
Good article, Bob. Funny that I just used this technique in implementing a new application for a client. Mind you, I used Cocoon and composed the app from internal pipelines, but the principle is the same.
One thing I found useful, is that sometimes you need/want to transform the response you are receiving from the web service. One simple way to do that, yet not screw up your primary flow of transforms on your original source document is to use the mode attribute on apply-templates. Something like this works very elegantly:
<xsl:apply-templates select="document( $webServiceURL )" mode="processWSResponse"/>
Then code your templates that process the response as:
<xsl:template match="something" mode="processWSResponse"/>
If you name your modes with descriptive identifiers, it keeps your XSLT code nicely organized, so that at a glance you can check what a template will be transforming.
....Andrzej
|