use of org.xml.sax.Attributes in project sling by apache.
the class Parser method parseAttributeDirective.
/*
* Parses a attribute directive with the following syntax:
* AttributeDirective ::= ( S Attribute)*
*/
private void parseAttributeDirective(Node parent) throws JasperException {
Attributes attrs = parseAttributes();
Node.AttributeDirective n = new Node.AttributeDirective(attrs, start, parent);
}
use of org.xml.sax.Attributes in project sling by apache.
the class Parser method parseSetProperty.
/*
* For SetProperty: StdActionContent ::= Attributes EmptyBody
*/
private void parseSetProperty(Node parent) throws JasperException {
Attributes attrs = parseAttributes();
reader.skipSpaces();
Node setPropertyNode = new Node.SetProperty(attrs, start, parent);
parseOptionalBody(setPropertyNode, "jsp:setProperty", TagInfo.BODY_CONTENT_EMPTY);
}
use of org.xml.sax.Attributes in project sling by apache.
the class Parser method parseTaglibDirective.
/*
* Parses a taglib directive with the following syntax: Directive ::= ( S
* Attribute)*
*/
private void parseTaglibDirective(Node parent) throws JasperException {
Attributes attrs = parseAttributes();
String uri = attrs.getValue("uri");
String prefix = attrs.getValue("prefix");
if (prefix != null) {
Mark prevMark = pageInfo.getNonCustomTagPrefix(prefix);
if (prevMark != null) {
err.jspError(reader.mark(), "jsp.error.prefix.use_before_dcl", prefix, prevMark.getFile(), "" + prevMark.getLineNumber());
}
if (uri != null) {
String uriPrev = pageInfo.getURI(prefix);
if (uriPrev != null && !uriPrev.equals(uri)) {
err.jspError(reader.mark(), "jsp.error.prefix.refined", prefix, uri, uriPrev);
}
if (pageInfo.getTaglib(uri) == null) {
TagLibraryInfoImpl impl = null;
String[] location = ctxt.getTldLocation(uri);
impl = new TagLibraryInfoImpl(ctxt, parserController, pageInfo, prefix, uri, location, err);
pageInfo.addTaglib(uri, impl);
}
pageInfo.addPrefixMapping(prefix, uri);
} else {
String tagdir = attrs.getValue("tagdir");
if (tagdir != null) {
String urnTagdir = URN_JSPTAGDIR + tagdir;
if (pageInfo.getTaglib(urnTagdir) == null) {
pageInfo.addTaglib(urnTagdir, new ImplicitTagLibraryInfo(ctxt, parserController, pageInfo, prefix, tagdir, err));
}
pageInfo.addPrefixMapping(prefix, urnTagdir);
}
}
}
new Node.TaglibDirective(attrs, start, parent);
}
use of org.xml.sax.Attributes in project sling by apache.
the class Parser method parseIncludeDirective.
/*
* Parses an include directive with the following syntax: IncludeDirective
* ::= ( S Attribute)*
*/
private void parseIncludeDirective(Node parent) throws JasperException {
Attributes attrs = parseAttributes();
// Included file expanded here
Node includeNode = new Node.IncludeDirective(attrs, start, parent);
processIncludeDirective(attrs.getValue("file"), includeNode);
}
use of org.xml.sax.Attributes in project sling by apache.
the class Parser method parseDoBody.
private void parseDoBody(Node parent) throws JasperException {
Attributes attrs = parseAttributes();
reader.skipSpaces();
Node doBodyNode = new Node.DoBodyAction(attrs, start, parent);
parseEmptyBody(doBodyNode, "jsp:doBody");
}
Aggregations