[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Error message saying doc is not well formed, solve
Steve,
On 5/4/2011 2:34 PM, Steve Fogel wrote: Turns out that when I took this stylesheet out of system A and plugged it into system B, it caused templates to be run out of order. It had a match attribute that was the same as the match attribute of a system B template that should have been run first. Instead, the template in this stylesheet ran first, skipping all the code that writes out the enclosing<html> and<body> tags. I take it this arises because the import precedence of the system A template is higher than the import precedence of the template already in system B, where it is now being used. Ordinarily, we avoid this problem by giving the local (customizing) system, B, a higher priority than the generalized (customized) system, A. That is, the customization layer (B) imports the generic layer (A). If this isn't possible, and you want to include the A templates unchanged, but you can change the B templates, this will work: Add a name to the template in system B. Introduce a C layer that imports A (which imports B). In C, match the element and call the B template by name. Applying templates to the element will then invoke the C template, which will dispatch to the B template, skipping A. Of course, this is very roundabout. Using modes also works, and could be preferable. But best would be for B to import A, not A import B. This uses the import mechanism as designed. Cheers, Wendell ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|