Subject: RE: [xsl] explain of Joerg xslt (was: xsl:copy ...) From: "Matias Woloski" <woloski@xxxxxxxx> Date: Mon, 8 Apr 2002 03:35:39 -0300 |
: ii) Why the Indice tag is changing for the tree tag? Only by > putting the > : <tree> tag inside the <xsl:template> which matchs the tag name > Indice will > : do the trick? This syntax wants to say: Match all Indice tags and > when you > : find each one parse and write <tree> <xsl:appl... </tree> instead > of what > : the Indice tag has inside it? hope you understand this question :) > > Well, basically when you write xsl to transform an xml document to > another document type, be it xml or html > or else, you process an input document by writing rules (templates) > of how this document is to be transformed. > Therefore it is up to you to decide what will be inside the output > document and what not. <xsl:....> type of elements are mere > instructions to the xsl processor to process the document you feed > into it with the given stylesheet. > > You are free to use whatever you want to use in your stylesheet to > have a output document (tree) matching your needs. Therefore it is > absolutely allowed to insert a <tree> tag into the stylesheet, as > long as you close this tag =) > Whatever you write into the stylesheet to be output in the output > document (tree), it will be in there. Carsten, I undestand this what I cannot understand is why the Indice element doesn't show in the output xml. But I think I'm understanding now... If I build a stylesheet with this only <xsl:template match="Indice"> </xsl:template> I will get nothing as the output. I'm on the right way! yes! :) > > As you can see, xsl:copy creates a copy of the current node. > xsl:copy-of does have a select attribute which enables you to copy a > set of nodes directly to the output tree without touching them, > except for what the > processor will apply to the nodes in the output tree (see above). > So it's the same doing this <xsl:template match="@*"> <xsl:copy /> </xsl:template> and this <xsl:template match="@*"> <xsl:copy-of select="." /> </xsl:template> > > Okay hope my "kauderwelsch" is easy to understand and does not state > that much of incorrect > information as I wish it could =) This was really helpful and clear. I'm starting to get this strange language. Thank you for your teaching time! :) regards, Matias XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] explain of Joerg xslt (wa, Carsten Klein | Thread | Re: [xsl] explain of Joerg xslt (wa, Carsten Klein |
Re: [xsl] explain of Joerg xslt (wa, Carsten Klein | Date | RE: [xsl] creating XML in a servlet, Najmi, Jamal |
Month |