Solved

Muenchian grouping

Posted on 2007-12-05
3
301 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
  • 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

If I have to fix slow responding website my first thoughts are server side optimizations: the database may not be optimized or caching is not enabled, or things like that. We often overlook another major part of our web application: the client. We o…
It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

759 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now