Subject: Re: [xsl] document() From: tcn@xxxxxxxxxxxxx (Trevor Nash) Date: Thu, 12 Jul 2001 18:58:10 GMT |
Alexey, Where you say document('{src}') You cannot use attribute value templates in an XPath expression. I think you want document(@src) Regards, Trevor Nash >Dear colleagues, > >I am stuck with making appropriate code. May be you have some ready >solution. I'd be glad if you share it with me. > >In processed document I have > ><xgl> > <contents> > <div src="c_div1.xml"> > <title level="0" text="Title 1"/> > <div src="c_div2.xml"> > <title level="1" text="Title 1.1"/> >NB! <div src="c_div3.xml"> > <title level="2" text="Title 1.2"/> > </div> > </div> > </div> > </contents> ></xgl> > >and in c_div3.xml > ><xgl> <!-- root element --> > <section ...> > <text>...</text> >NB! <style ... ptsize="16" .../> > </section> > >I want to bring div[title/@text="Title 1.2"] to the higher level in >hierarchy, because @ptsize of its 1st section is 16. So I write > ><xsl:template match="div[div]"> > <xsl:copy-of select="div[title/@level='2' and document('{src}')//section[1]/style/@ptsize='16']"/> ></xsl:template> ><xsl:template match="div[title/@level='2' and document('{src}')//section/style/@ptsize='16']"> ></xsl:template> > >That makes in source document <content></content> > >Where am I wrong? >Deleting the second template doesn't change the situation. -- Traditional training & distance learning, Consultancy by email Melvaig Software Engineering Limited voice: +44 (0) 1445 771 271 email: tcn@xxxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] document(), Alexey Skoblikov | Thread | [xsl] XML to HTML, Kevin_Gutch |
RE: [xsl] Saxon and HashMap/Hashtab, William Lam | Date | Re: [xsl] Grouping repeating elemen, Trevor Nash |
Month |