On Wed, Aug 16, 2006 at 03:45:32PM +0200, Daniel Leidert wrote:
> Am Mittwoch, den 16.08.2006, 15:11 +0200 schrieb Jeroen Ruigrok/asmodai:
> > -On [20060816 15:02], Daniel Leidert ([EMAIL PROTECTED]) wrote:
> > >But it fails (with our without 'file://') and only shows the "error
> > >message". I was wondering, if xsltproc simply ignores the xi:include
> > >here, or if I'm doing something wrong.
> > 
> > Are you calling xsltproc with the --xinclude parameter?
> 
> Yes. I now tested with Xalan(2.6.0)/Xerces(2.6.2) and
> Saxon(6.5.5)/Xerces(2.6.2) and both do, what I want them to do with the
> code I provided. Only xsltproc seems to ignore the xi:include in the
> stylesheet, or it has a problem with the href-attribute. Shall xsltproc
> be able to process xi:include elements in a stylesheet? If not, I would
> like to add it as a wishlist item.

  ah ! xinclude wasn't applied to the stylesheet itself only on documents.
Can you test the attached patch ?

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/
Index: xsltproc/xsltproc.c
===================================================================
RCS file: /cvs/gnome/libxslt/xsltproc/xsltproc.c,v
retrieving revision 1.64
diff -u -r1.64 xsltproc.c
--- xsltproc/xsltproc.c 6 Apr 2005 22:02:14 -0000       1.64
+++ xsltproc/xsltproc.c 16 Aug 2006 13:53:39 -0000
@@ -777,6 +777,18 @@
            style = xmlReadFile((const char *) argv[i], NULL, options);
             if (timing) 
                endTimer("Parsing stylesheet %s", argv[i]);
+            if (style != NULL) {
+               if (timing)
+                   startTimer();
+#if LIBXML_VERSION >= 20603
+               xmlXIncludeProcessFlags(style, XSLT_PARSE_OPTIONS);
+#else
+               xmlXIncludeProcess(style);
+#endif
+               if (timing) {
+                   endTimer("XInclude processing %s", argv[i]);
+               }
+           }
            if (style == NULL) {
                fprintf(stderr,  "cannot parse %s\n", argv[i]);
                cur = NULL;
_______________________________________________
xslt mailing list, project page http://xmlsoft.org/XSLT/
[email protected]
http://mail.gnome.org/mailman/listinfo/xslt

Reply via email to