Solved

Muenchian grouping

Posted on 2007-12-05
3
311 Views
Last Modified: 2013-11-18
I am trying to aplly xsl transfor on a Muenchian grouping logic involving keys.But i get error as below.
Do I need a special xslt procesor for this .I read that "xt" and pre May 2000 MSXML are not good.What parser should I use ?


Error.....

Invalid factory configuration
javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: xsl:key is not allowed in this position in the stylesheet!
0
Comment
Question by:amhicraig
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
3 Comments
 
LVL 39

Accepted Solution

by:
abel earned 500 total points
ID: 20415662
Hi Amhicraig,

The error you show means that your XSLT stylesheet is not correct. In your case, you have probably put the xsl:key instruction on some other level than the root level (the root level means the level right under xsl:stylesheet instruction), but it is a bit hard to tell you how to fix it without seeing your actual code.

Muenchian grouping is a rather advanced technique and it can be tricky to get it right. Even experienced XSLT programmers sometimes have trouble with it. If you have the possibility to choose your XSLT processor and if you are still learning XSLT, I'd strongly advice you to use XSLT 2.0, as it is easier to learn, has more instructions (making complex tasks a one-liner where you needed recursive programming techniques in 1.0) and, perhaps most important to you now, has a standard xsl:for-each-group instruction to handle just about all grouping scenarios.

A good XSLT 2.0 processor is Saxon 8.9. It is very stable, reliable, fast and comes for both the .NET and the Java platform. There is a lot of documentation and the owner maintains a mailing list that has very quick response rates. You can find Saxon on http://www.saxonica.com. The Saxon-B version is free and open source. Saxon-SA is not free, but it is unlikely that you will need it.

Any XSLT 2.0 processor can also handle XSLT 1.0, but will issue a warning (which you can switch off). Forget about complex Muenchian grouping and try Saxon with XSLT 2.0 (and now, I am not a stake holder ;)

If you need some helping getting your grouping problem up and running, show some input and (expected) output and possibly the current code you have.

HTH,
Cheers,
-- Abel --
0
 
LVL 39

Assisted Solution

by:abel
abel earned 500 total points
ID: 20415753
PS: if you do want to stick with XSLT 1.0 (for instance if you need to do client side browser transformations or because of legacy code) you have ample choice. You can use Xalan (Java), Saxon 6.5 (Java and .NET), Libxslt (C++), MSXML (ActiveX), .NET XsltCompiledTransform etc (.NET), Unicorn (C++), AltovaXML (proprietary)

All recent versions of the above are stable processors and there are many more still. Personally, I favor Saxon for stability and XSLT 2.0, and I favor MS .NET XLST when I need speed (it seems to be the fastest XSLT 1.0 processor around, but I don't find their error messages all too clear).
0
 
LVL 39

Expert Comment

by:abel
ID: 20416505
why do you give a B grade? If you weren't entirely satisfied with the answer, you can use the Comment feature of EE to ask for more information, more help etc. That's what we're here for. A B-grade (or C) means that there's something left to desire. On EE it is common practice to grade A when an anwsers comes quick and when it helps you out enough. If it doesn't, it is common practice to ask for more before grading a B.

The points are not interesting to me, I just like to help and now it looks like you may need some more help ;)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to count occurrences of each item in an array.

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question