Subject: [xsl] Muenchian grouping in XSLT 2 From: "Thomas J. Sebestyen" <a9105535@xxxxxxxxxxxxxxxxx> Date: Tue, 06 Sep 2005 21:52:17 +0200 |
Hello, given the following xml (see above at the end of mail) and the following xslt: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhmtl1-transitional.dtd" include-content-type="yes" indent="yes" method="xhtml" omit-xml-declaration="yes"/> <xsl:key match="li" name="likey" use="."/> <xsl:template match="/"> <html> <head> <title /> </head> <body> <xsl:apply-templates select="usability/inhalt/litlist"/> </body> </html> </xsl:template> <xsl:template match="litlist"> <ul> <xsl:for-each select="ul/li[generate-id(.) = generate-id(key('likey', .)[1])]"> <xsl:sort/> <li> <xsl:value-of select="."/> </li> </xsl:for-each> </ul> </xsl:template> </xsl:stylesheet> Saxon 8.4 do the transformation without any problem (no errors reported). XMLSyp abort the tranformation at <xsl:for-each select="ul/li[generate-id(.) = generate-id(key('likey', .)[1])]"> and lapidary said: "Error in XPath 2.0 expression". Which of the processor is right? I could not explain the behavior of XMLSpy to me. Regards Thomas Example xml: <?xml version="1.0" encoding="UTF-8"?> <usability> <inhalt> <litlist> <ul> <li>Nielsen, Jakob & Mack, Robert (1994): Usability Inspection Methods. New York & andere: John Wiley & Sons.</li> <li>Nielsen, Jakob (1993). Usability Engineering. Boston: Academic Press.</li> <li>Rosson, M. & Carroll, J. (2002). Usability Engineering - Scenario-based development of human-computer interaction. San Francisco(u.a.): Morgan Kaufmann.</li> <li>Rosenfeld, L. & Morville, P. (2002). Information Architecture for the World Wide Web: Designing Large Scale Web Sites. Cambridge: OReilly & Associates.</li> <li>Schweibenz, Werner (2001). Evaluation des Intranet-Angebots Multimediales Lernen bei DaimlerChrysler, Standort Stuttgart. In R. Schmidt (Hrsg.), Information Research & Content - Orientierung, Ordnung und Organisation im Wissensmarkt. Proceedings der 23. Online-Tagung der DGI und 53. Jtg Frankfurt am Main 8. bis 10. Mai 200.1 (486-497). Frankfurt/Main: DGI. </li> <li>Nielsen, Jakob & Mack, Robert (1994): Usability Inspection Methods. New York & andere: John Wiley & Sons.</li> <li>Scriven, Michael (1967): The methodology of evaluation. In: R. Tyler, R. Gagne und M. Scriven: Perspectives of curriculum evaluation. Rand McNally.</li> <li>Thimbleby, Harold (2004). User interface design with matrix algebra. In: ACM Transactions on Computer-Human-Interaction (11-2). S. 181-236.</li> <li>Kahn, Michael & Prail, Amanda (1994): Formal Usability Inspection. In: Nielsen, Jakob & Mack, Robert (1994): Usability Inspection Methods. New York & andere: John Wiley & Sons. S.141-171.</li> <li>Mandl, H., Prenzel, M. & Rheinmann-Rothmeier, G. (1994). Computerunterst|tzte Lernumgebungen., (Hrsg.)Arzberger H. & Brehm, K.H.. Erlangen: Publicis MCD Verlag.</li> <li>Nielsen, Jakob (1993). Usability Engineering. Boston: Academic Press.</li> <li>Bartel, T. (2003). Die Verbesserung der Usability von WebSites - auf der Basis von WebStyleguides, Usability Testing und Logfile-Analysen. Berlin: WiKu.</li> <li>Hegner, M. (2003). Methoden zur Evaluation von Sowftware. IZ-Arbeitsbericht Nr. 29, Bonn: InformationsZentrum Sozialwissenschaften (ASI).</li> <li>Rosson, M. & Carroll, J. (2002). Usability Engineering - Scenario-based development of human-computer interaction. San Francisco(u.a.): Morgan Kaufmann.</li> <li>Rosenfeld, L. & Morville, P. (2002). Information Architecture for the World Wide Web: Designing Large Scale Web Sites. Cambridge: OReilly & Associates.</li> <li>Rosenfeld, L. & Morville, P. (2002). Information Architecture for the World Wide Web: Designing Large Scale Web Sites. Cambridge: OReilly & Associates.</li> </ul> </litlist> </inhalt> </usability>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: Indentation question, iwantto keepanon | Thread | RE: [xsl] Muenchian grouping in XSL, Michael Kay |
[xsl] Re: Indentation question, iwantto keepanon | Date | [xsl] apply-templates issue, footh |
Month |