+Wed Feb 25 14:24:34 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * libxslt/variables.c: trying to use the fact that names comes
+ from a dictionnary when looking up for variables.
+ * tests/documents/Makefile.am: try to fix an error reported on
+ the list.
+
Wed Feb 25 17:02:22 HKT 2004 William Brack <wbrack@mmm.com.hk>
* tests/general/Makefile.am, tests/general/bug-142.xsl,
static xsltStackElemPtr
xsltStackLookup(xsltTransformContextPtr ctxt, const xmlChar *name,
const xmlChar *nameURI) {
- xsltStackElemPtr ret = NULL;
int i;
xsltStackElemPtr cur;
/*
* Do the lookup from the top of the stack, but
* don't use params being computed in a call-param
+ * First lookup expects the variable name and URI to
+ * come from the disctionnary and hence get equality
+ */
+ for (i = ctxt->varsNr; i > ctxt->varsBase; i--) {
+ cur = ctxt->varsTab[i-1];
+ while (cur != NULL) {
+ if (cur->name == name) {
+ if (nameURI == NULL) {
+ if (cur->nameURI == NULL) {
+ return(cur);
+ }
+ } else {
+ if ((cur->nameURI != NULL) &&
+ (cur->nameURI == nameURI)) {
+ return(cur);
+ }
+ }
+
+ }
+ cur = cur->next;
+ }
+ }
+
+#if 0
+ if ((xmlDictOwns(ctxt->dict, name) <= 0) ||
+ ((nameURI != NULL) && (xmlDictOwns(ctxt->dict, nameURI) <= 0))) {
+ /*
+ * Redo the lookup with string compares
+ */
+ for (i = ctxt->varsNr; i > ctxt->varsBase; i--) {
+ cur = ctxt->varsTab[i-1];
+ while (cur != NULL) {
+ if (xmlStrEqual(cur->name, name)) {
+ if (nameURI == NULL) {
+ if (cur->nameURI == NULL) {
+ return(cur);
+ }
+ } else {
+ if ((cur->nameURI != NULL) &&
+ (xmlStrEqual(cur->nameURI, nameURI))) {
+ return(cur);
+ }
+ }
+
+ }
+ cur = cur->next;
+ }
+ }
+ }
+#else
+ /*
+ * Redo the lookup with string compares
*/
for (i = ctxt->varsNr; i > ctxt->varsBase; i--) {
cur = ctxt->varsTab[i-1];
cur = cur->next;
}
}
- return(ret);
+#endif
+ return(NULL);
}
/**
$(top_builddir)/xsltproc/xsltproc:
@(cd ../../xsltproc ; $(MAKE) xsltproc)
-EXTRA_DIST = bredfort.css index.xml system.xml \
- bredfort.xsl menu.xml worklog.xml \
- result.xhtml docfile.xml doc_file.xml \
- test.xml test.xsl test.result \
- message.xml message.xsl message.result
+EXTRA_DIST = \
+ bredfort.css bredfort.xsl doc_file.xml docfile.xml \
+ fragment2.xml fragment.result fragment.xml fragment.xsl \
+ index.xml menu.xml message.result message.xml message.xsl \
+ result.xhtml system.xml test_bad.err test_bad.result \
+ test_bad.xml test.result test.xml test.xsl worklog.xml
all: