public XPathExpression(String text, Expression xpathExpr, TagScript tagScript) { this.text = text; this.xpathExpr = xpathExpr; Map namespaceContext = tagScript.getNamespaceContext(); this.uris = createUriMap(namespaceContext); }
public XPathExpression(String text, Expression xpathExpr, TagScript tagScript) { this.text = text; this.xpathExpr = xpathExpr; Map namespaceContext = tagScript.getNamespaceContext(); this.uris = createUriMap(namespaceContext); }
public XPathExpression(String text, Expression xpathExpr, TagScript tagScript) { this.text = text; this.xpathExpr = xpathExpr; Map namespaceContext = tagScript.getNamespaceContext(); this.uris = createUriMap(namespaceContext); }
public XPathExpression(String text, Expression xpathExpr, TagScript tagScript) { this.text = text; this.xpathExpr = xpathExpr; Map namespaceContext = tagScript.getNamespaceContext(); this.uris = createUriMap(namespaceContext); }
/** * Returns the namespace context of this tag. This is all the prefixes * in scope in the document where this tag is used which are mapped to * their namespace URIs. * * @return a Map with the keys are namespace prefixes and the values are * namespace URIs. */ public synchronized Map getNamespaceContext() { if (namespaceContext == null) { if (parent != null) { namespaceContext = getParent().getNamespaceContext(); if (tagNamespacesMap != null && !tagNamespacesMap.isEmpty()) { // create a new child context Hashtable newContext = new Hashtable(namespaceContext.size()+1); newContext.putAll(namespaceContext); newContext.putAll(tagNamespacesMap); namespaceContext = newContext; } } else { namespaceContext = tagNamespacesMap; if (namespaceContext == null) { namespaceContext = new Hashtable(); } } } return namespaceContext; }
/** * Returns the namespace context of this tag. This is all the prefixes * in scope in the document where this tag is used which are mapped to * their namespace URIs. * * @return a Map with the keys are namespace prefixes and the values are * namespace URIs. */ public synchronized Map getNamespaceContext() { if (namespaceContext == null) { if (parent != null) { namespaceContext = getParent().getNamespaceContext(); if (tagNamespacesMap != null && !tagNamespacesMap.isEmpty()) { // create a new child context Hashtable newContext = new Hashtable(namespaceContext.size()+1); newContext.putAll(namespaceContext); newContext.putAll(tagNamespacesMap); namespaceContext = newContext; } } else { namespaceContext = tagNamespacesMap; if (namespaceContext == null) { namespaceContext = new Hashtable(); } } } return namespaceContext; }
/** * Returns the namespace context of this tag. This is all the prefixes * in scope in the document where this tag is used which are mapped to * their namespace URIs. * * @return a Map with the keys are namespace prefixes and the values are * namespace URIs. */ public synchronized Map getNamespaceContext() { if (namespaceContext == null) { if (parent != null) { namespaceContext = getParent().getNamespaceContext(); if (tagNamespacesMap != null && !tagNamespacesMap.isEmpty()) { // create a new child context Hashtable newContext = new Hashtable(namespaceContext.size()+1); newContext.putAll(namespaceContext); newContext.putAll(tagNamespacesMap); namespaceContext = newContext; } } else { namespaceContext = tagNamespacesMap; if (namespaceContext == null) { namespaceContext = new Hashtable(); } } } return namespaceContext; }
/** * Returns the namespace context of this tag. This is all the prefixes * in scope in the document where this tag is used which are mapped to * their namespace URIs. * * @return a Map with the keys are namespace prefixes and the values are * namespace URIs. */ public synchronized Map getNamespaceContext() { if (namespaceContext == null) { if (parent != null) { namespaceContext = getParent().getNamespaceContext(); if (tagNamespacesMap != null && !tagNamespacesMap.isEmpty()) { // create a new child context Hashtable newContext = new Hashtable(namespaceContext.size()+1); newContext.putAll(namespaceContext); newContext.putAll(tagNamespacesMap); namespaceContext = newContext; } } else { namespaceContext = tagNamespacesMap; if (namespaceContext == null) { namespaceContext = new Hashtable(); } } } return namespaceContext; }
/** * Compiles a newly created tag if required, sets its parent and body. */ protected void configureTag(Tag tag, JellyContext context) throws JellyException { if (tag instanceof CompilableTag) { ((CompilableTag) tag).compile(); } Tag parentTag = null; if ( parent != null ) { parentTag = parent.getTag(context); } tag.setParent( parentTag ); tag.setBody( tagBody ); if (tag instanceof NamespaceAwareTag) { NamespaceAwareTag naTag = (NamespaceAwareTag) tag; naTag.setNamespaceContext(getNamespaceContext()); } if (tag instanceof LocationAware) { applyLocation((LocationAware) tag); } }
/** * Compiles a newly created tag if required, sets its parent and body. */ protected void configureTag(Tag tag, JellyContext context) throws JellyException { if (tag instanceof CompilableTag) { ((CompilableTag) tag).compile(); } Tag parentTag = null; if ( parent != null ) { // if the parent script isn't a TagScript, parent is null. parentTag = (Tag)context.getVariable(PARENT_TAG); } tag.setParent( parentTag ); tag.setBody( tagBody ); if (tag instanceof NamespaceAwareTag) { NamespaceAwareTag naTag = (NamespaceAwareTag) tag; naTag.setNamespaceContext(getNamespaceContext()); } if (tag instanceof LocationAware) { applyLocation((LocationAware) tag); } }
/** * Compiles a newly created tag if required, sets its parent and body. */ protected void configureTag(Tag tag, JellyContext context) throws JellyException { if (tag instanceof CompilableTag) { ((CompilableTag) tag).compile(); } Tag parentTag = null; if ( parent != null ) { parentTag = parent.getTag(context); } tag.setParent( parentTag ); tag.setBody( tagBody ); if (tag instanceof NamespaceAwareTag) { NamespaceAwareTag naTag = (NamespaceAwareTag) tag; naTag.setNamespaceContext(getNamespaceContext()); } if (tag instanceof LocationAware) { applyLocation((LocationAware) tag); } }
/** * Compiles a newly created tag if required, sets its parent and body. */ protected void configureTag(Tag tag, JellyContext context) throws JellyException { if (tag instanceof CompilableTag) { ((CompilableTag) tag).compile(); } Tag parentTag = null; if ( parent != null ) { parentTag = parent.getTag(context); } tag.setParent( parentTag ); tag.setBody( tagBody ); if (tag instanceof NamespaceAwareTag) { NamespaceAwareTag naTag = (NamespaceAwareTag) tag; naTag.setNamespaceContext(getNamespaceContext()); } if (tag instanceof LocationAware) { applyLocation((LocationAware) tag); } }