[Webtest] [dev] source cleanup: xsl document()

webtest@lists.canoo.com webtest@lists.canoo.com
Tue, 12 Oct 2004 17:47:35 +0200 (CEST)


Ah, now I understand.
This is cool and elegant!

thanx
Mittie

 -------- Original Message --------


From: mguillemot@yahoo.fr
Sent: Tue Oct 12 14:25:34 CEST 2004
To: webtest@lists.canoo.com
CC: 
Subject: Re: [Webtest] [dev] source cleanup: xsl document()

Salut Dierk,

and you want an example too! This means, that I have to test by myself, not only to know that it's possible ;-)
Ok, I've got it (and I've improved my xslt knowledge by the way).

An example:

first in syntax.xml, let's change
<code caption="followframe">
	&followframeExample;
</code>

to
<code caption="followframe" src="examples/followframeExample.xml"/>


then make examples/followframeExample.xml a valid xml file like:
<code>
&lt;<tag>testSpec</tag>&#160;<att>name</att><val>Follow&#160;target&#160;frame..</val>&gt;<n/>
<t/>&lt;<tag>config</tag>&#160;...&#160;/&gt;<n/>
....
</code>

and finally in WhitePaperStyle.xsl change
<div class="code">
	<xsl:apply-templates/>
</div>

to:
<div class="code">
	<xsl:apply-templates select="document(@src)/code"/>
</div>

and that's it.

Marc.

Dierk Koenig wrote:
>>>>what about using xsl:document in the xslt rather than entities in 
>>>>the xml? Indeed the doctype with the entities is the 
>>>>cause of all the errors reported during the xslt transformation.
>>>
>>>Does xsl:document remove the dependency?
>>
>>it should.
> 
> 
> Can you please give an example?
> 
> cheers
> Mittie
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest

---------------- End of Message -----------------


 -------- Original Message --------


From: mguillemot@yahoo.fr
Sent: Tue Oct 12 14:25:34 CEST 2004
To: webtest@lists.canoo.com
CC: 
Subject: Re: [Webtest] [dev] source cleanup: xsl document()

Salut Dierk,

and you want an example too! This means, that I have to test by myself, not only to know that it's possible ;-)
Ok, I've got it (and I've improved my xslt knowledge by the way).

An example:

first in syntax.xml, let's change
<code caption="followframe">
	&followframeExample;
</code>

to
<code caption="followframe" src="examples/followframeExample.xml"/>


then make examples/followframeExample.xml a valid xml file like:
<code>
&lt;<tag>testSpec</tag>&#160;<att>name</att><val>Follow&#160;target&#160;frame..</val>&gt;<n/>
<t/>&lt;<tag>config</tag>&#160;...&#160;/&gt;<n/>
....
</code>

and finally in WhitePaperStyle.xsl change
<div class="code">
	<xsl:apply-templates/>
</div>

to:
<div class="code">
	<xsl:apply-templates select="document(@src)/code"/>
</div>

and that's it.

Marc.

Dierk Koenig wrote:
>>>>what about using xsl:document in the xslt rather than entities in 
>>>>the xml? Indeed the doctype with the entities is the 
>>>>cause of all the errors reported during the xslt transformation.
>>>
>>>Does xsl:document remove the dependency?
>>
>>it should.
> 
> 
> Can you please give an example?
> 
> cheers
> Mittie
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest

---------------- End of Message -----------------