[libxslt] Ignore imported stylesheets in xsltApplyAttributeSet
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxslt] Ignore imported stylesheets in xsltApplyAttributeSet
- Date: Tue, 21 Jun 2016 12:20:41 +0000 (UTC)
commit 6b15a8fc1a27d35a2b9da8a07d5cc6b6c3f83b6d
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Tue Apr 19 12:06:24 2016 +0200
Ignore imported stylesheets in xsltApplyAttributeSet
All attribute sets are moved to the top stylesheets in the resolution
process.
libxslt/attributes.c | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
---
diff --git a/libxslt/attributes.c b/libxslt/attributes.c
index df7999a..196ca95 100644
--- a/libxslt/attributes.c
+++ b/libxslt/attributes.c
@@ -1172,21 +1172,20 @@ xsltApplyAttributeSet(xsltTransformContextPtr ctxt, xmlNodePtr node,
}
#endif
/*
- * Lookup the referenced attribute-set.
+ * Lookup the referenced attribute-set. All attribute sets were
+ * moved to the top stylesheet so there's no need to iterate
+ * imported stylesheets
*/
- while (style != NULL) {
- set = xmlHashLookup2(style->attributeSets, ncname, nsUri);
- if (set != NULL) {
- xsltAttrElemPtr cur = set->attrs;
- while (cur != NULL) {
- if (cur->attr != NULL) {
- xsltAttribute(ctxt, node, cur->attr,
- cur->attr->psvi);
- }
- cur = cur->next;
+ set = xmlHashLookup2(style->attributeSets, ncname, nsUri);
+ if (set != NULL) {
+ xsltAttrElemPtr cur = set->attrs;
+ while (cur != NULL) {
+ if (cur->attr != NULL) {
+ xsltAttribute(ctxt, node, cur->attr,
+ cur->attr->psvi);
}
+ cur = cur->next;
}
- style = xsltNextImport(style);
}
}
curstr = endstr;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]