|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Transform xhtml to xhtml, convert one tag to anoth
Peter, Peter, At 03:21 PM 2/7/2005, you wrote: <?xml version="1.0" encoding="iso-8859-1"?> This should work. Your troubleshooting suggests the template matching "reference" is not getting matched. You may have seen another thread go by, in which the OP learned that if an element name is in a namespace, even if without a prefix, it has to be prefixed to match: <xsl:template match="n:reference">... with xmlns:n declared to match the xmlns namespace declaration in your source. Could this be the problem here? I'm using Xalan (integrated with Apache Ant) for my transformations. Could this have _anything_ to do with it? Yes, it's but not very likely. This is basic and the same version of Xalan is already doing it correctly thousands of times a day. Or am I at fault? No doubt, or your grade-school math teacher, who didn't teach you about XML namespaces. (We're shocked!) I'd show the XHTML file that needs to get processed and the <reference> template, but their both quite big, and don't seem to have anything to do with it, since I don't get any warnings or errors. The template isn't getting matched at all ... so the question is why. An incorrect namespace binding could well be the culprit. Note that in: <element> <child/> </element> and <element xmlns="mynamespace"> <child/> </element> ... the two "child" elements do *not* have the same name, despite appearances. To make matters worse, the *only* way in XSLT to match the child by name in the second example is with an explicit prefix: match="n:child" xmlns:n="mynamespace" ... I hope that helps. 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
|

Cart








