On Thu, May 10, 2007 at 05:14:38PM -0400, Brad Clements wrote:
> (I hope this is not OT, my RPM foo is low. I am trying to debug a 
> libxml2/libxslt 
> problem) ..
> 
> 
> I am trying to debug a stylesheet problem, where I get this error:
> 
> runtime error: file 
> /home/bkc/src/eclipse/main24/tal2xslt/tal2xslt/xsl/tal2xslt. xsl 
> line 450 element copy-of
> Attribute nodes must be added before any child nodes to an element.
> 
> I do know what this means, but I'm stumped trying to figure out how to debug 
> it.
> 
> My stylesheet is complex, and this particular template could be called from 
> several different places via apply-templates. 

  xsltproc -v , log and analyze the debug output.

> It would be handy to know the name of the output element that already has 
> children, the names and values of the attributes already applied to that 
> element (if 
> any), the name of the attribute that is trying to be created, and the name(s) 
> of 
> child elements that already exist.
> 
> 
> So I thought I'd try modifying libxslt/transform.c to see if I could output 
> at least 
> some of the above data in the error message.

  agreed adding more context information would really help.

> I'm using RHEL4, but Python 2.4 is installed as an alternate install, so it's 
> in 
> /usr/local/bin/python2.4
> 
> When I install libxml2-2.6.28-1.src.rpm (via rpmbuild --rebuild), it picks up 
> the 
> system python  (version 2.3)
> 
> To work around this, after installing the source rpms for libxml2 and 
> libxslt, I've 
> been rebuilding libxml2-python-2.6.21 with python2.4. I know that 
> libxml2-python-
> 2.6.21 is quite old.
> 
> Another issue is that xsltproc does not generate the error when performing a 
> transform, however my Python application does generate the error, even though 
> I 
> think the parameters and input files are exactly the same.
> 
> So I am thinking that maybe using libxml2-python-2.6.21 isn't doing what I 
> expect, 
> and that I'm still getting some other version of libxslt via python2.4 (but I 
> only see 
> one libxslt.so* file on my system)
> 
> (I couldn't find a way from the python bindings to determine what version of 
> libxml2 and libxslt was actually being loaded)

  try to run strace on the program and save the output to a log file.

> So I've installed the source rpms and modified the error message in 
> libxslt/transform.c and now I want to rebuild from the SPEC file and this 
> time tell 
> configure to use the alternate python, then install and this way I should be 
> sure 
> that python2.4 gets the correct, current bindings for libxslt.

  Honnestly having a /usr/local different version and trying to upgrade
systems components to use this is intenable. No idea how to do that
cleanly.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to