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

Marc Guillemot webtest@lists.canoo.com
Wed, 13 Oct 2004 11:16:56 +0200 (CEST)


the problem is that current state is not good: the xml file is not well
formed (look at all messages generated by the xslt), the dtd is not
complete.

Furthermore, I think that it's more readable, if information concerning
an example are located on one place in the file.

In fact we should go some steps further: 
- remove the perl transformation and perform a good xsl transformation
on an xml sample file to produce a well formatted example
- generate all this stuff automagically from the java files. When the
functionnality of a step change, the doc should change too. The easiest
way to perform this is to have the doc extracted from the java file...
using xdoclet for instance.

Marc.

 --- Dierk Koenig <dierk.koenig@canoo.com> a écrit : 
> Hm, thinking a second time...
> 
> It looks like we just trade the entity for
> an attribute. So conceptually the dependency 
> isn't removed. Only the resolving goes from 
> parsing time to xslt processing time.
> 
> When answering the question "what external
> files do e.g. syntax.xml depends upon?" we could
> just look at the entity declarations and find
> a nice overview there. We will loose that
> with the new approach.
> 
> your opinion?
> 
> Mittie
> 
> > -----Original Message-----
> > From: webtest-admin@lists.canoo.com
> > [mailto:webtest-admin@lists.canoo.com]On Behalf Of
> > dierk.koenig@mail.canoo.com
> > Sent: Dienstag, 12. Oktober 2004 17:48
> > To: WebTest@lists.canoo.com
> > Subject: Re: Re: [Webtest] [dev] source cleanup: xsl document()
> > 
> > 
> > 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> <att>name</att><val>Follow targe
> > t frame..</val>&gt;<n/>
> > <t/>&lt;<tag>config</tag> ... /&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> <att>name</att><val>Follow targe
> > t frame..</val>&gt;<n/>
> > <t/>&lt;<tag>config</tag> ... /&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 -----------------
> > 
> > _______________________________________________
> > 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
>  


	

	
		
Vous manquez d’espace pour stocker vos mails ? 
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com