dleslie 2002/06/04 12:52:38
Modified: java/src/org/apache/xalan/processor Tag: Xalan3
XSLTSchema.java ProcessorOutputElem.java
Added: java/src/org/apache/xalan/processor Tag: Xalan3
ProcessorResultDocument.java ProcessorFunction.java
ProcessorFuncResult.java
Log:
First version for Xalan3 branch!
Revision Changes Path
No revision
No revision
1.20.4.1 +280 -181
xml-xalan/java/src/org/apache/xalan/processor/XSLTSchema.java
Index: XSLTSchema.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/XSLTSchema.java,v
retrieving revision 1.20
retrieving revision 1.20.4.1
diff -u -r1.20 -r1.20.4.1
--- XSLTSchema.java 11 May 2001 23:12:05 -0000 1.20
+++ XSLTSchema.java 4 Jun 2002 19:52:38 -0000 1.20.4.1
@@ -86,6 +86,9 @@
XSLTAttributeDef hrefAttr = new XSLTAttributeDef(null, "href",
XSLTAttributeDef.T_URL, true);
+ XSLTAttributeDef hrefAttrOpt = new XSLTAttributeDef(null, "href",
+ XSLTAttributeDef.T_URL, false);
+
XSLTAttributeDef elementsAttr = new XSLTAttributeDef(null, "elements",
XSLTAttributeDef.T_SIMPLEPATTERNLIST,
true);
@@ -247,6 +250,20 @@
XSLTAttributeDef xslVersionAttr =
new XSLTAttributeDef(Constants.S_XSLNAMESPACEURL, "version",
XSLTAttributeDef.T_NMTOKEN, false);
+ //dml for result-document
+ XSLTAttributeDef resultDocFormatAttr =
+ new XSLTAttributeDef(null, "format",
+ XSLTAttributeDef.T_QNAME, false);
+ // dml for output
+ XSLTAttributeDef includeContentTypeAttr = new XSLTAttributeDef(null,
+ "include-content-type",
+ XSLTAttributeDef.T_YESNO,
+ false);
+ XSLTAttributeDef escapeUriAttributesAttr = new XSLTAttributeDef(null,
+ "excape-uri-asttributes",
+ XSLTAttributeDef.T_YESNO,
+ false);
+
XSLTElementDef charData = new XSLTElementDef(this, null, "text()",
null /*alias */, null /* elements */, null,
/* attributes */
new ProcessorCharacters(),
@@ -267,9 +284,12 @@
XSLTAttributeDef xslResultAttr =
new XSLTAttributeDef(Constants.S_XSLNAMESPACEURL, "*",
XSLTAttributeDef.T_CDATA, false);
- XSLTElementDef[] templateElements = new XSLTElementDef[21];
- XSLTElementDef[] templateElementsAndParams = new XSLTElementDef[22];
- XSLTElementDef[] templateElementsAndSort = new XSLTElementDef[22];
+ XSLTElementDef[] templateElements = new XSLTElementDef[24];
+ XSLTElementDef[] templateElementsAndParams = new XSLTElementDef[25];
+ XSLTElementDef[] templateElementsAndSort = new XSLTElementDef[25];
+ //exslt
+ XSLTElementDef[] exsltFunctionElements = new XSLTElementDef[25];//
although should exclude some template elements.
+
XSLTElementDef[] charTemplateElements = new XSLTElementDef[15];
XSLTElementDef resultElement = new XSLTElementDef(this, null, "*",
null /*alias */,
@@ -282,7 +302,7 @@
xslVersionAttr,
xslResultAttr,
resultAttr },
-
new
ProcessorLRE(),
+ new ProcessorLRE(),
ElemLiteralResult.class /* class object
*/, 20, true);
XSLTElementDef unknownElement =
new XSLTElementDef(this, "*", "unknown", null /*alias */,
@@ -293,14 +313,14 @@
xslVersionAttr,
xslResultAttr,
resultAttr },
-
new ProcessorUnknown(),
- ElemUnknown.class /* class object */, 20, true);
+ new ProcessorUnknown(),
+ ElemUnknown.class /* class
object */, 20, true);
XSLTElementDef xslValueOf = new XSLTElementDef(this,
Constants.S_XSLNAMESPACEURL, "value-of",
null /*alias */, null /* elements */,
new XSLTAttributeDef[]{ selectAttrRequired,
disableOutputEscapingAttr },
-
new
ProcessorTemplateElem(),
+ new ProcessorTemplateElem(),
ElemValueOf.class /* class object */, 20,
true);
XSLTElementDef xslCopyOf = new XSLTElementDef(this,
Constants.S_XSLNAMESPACEURL, "copy-of",
@@ -320,7 +340,7 @@
letterValueAttr,
groupingSeparatorAVT,
groupingSizeAttr },
-
new ProcessorTemplateElem(),
+ new ProcessorTemplateElem(),
ElemNumber.class /* class object */, 20,
true);
// <!-- xsl:sort cannot occur after any other elements or
@@ -335,7 +355,7 @@
dataTypeAttr,
orderAttr,
caseOrderAttr },
-
new ProcessorTemplateElem(),
+ new ProcessorTemplateElem(),
ElemSort.class/* class
object */, 19, true );
XSLTElementDef xslWithParam = new XSLTElementDef(this,
Constants.S_XSLNAMESPACEURL,
@@ -343,7 +363,7 @@
templateElements /* elements */, //
%template;>
new XSLTAttributeDef[]{ nameAttrRequired,
selectAttrOpt },
new ProcessorTemplateElem(),
-
ElemWithParam.class /* class object */);
+
ElemWithParam.class /* class object */, 19, true);
XSLTElementDef xslApplyTemplates = new XSLTElementDef(this,
Constants.S_XSLNAMESPACEURL,
"apply-templates", null /*alias */,
@@ -351,7 +371,7 @@
xslWithParam
} /* elements */, new XSLTAttributeDef[]{
selectAttrDefNode,
modeAttr },
-
new ProcessorTemplateElem(),
+ new
ProcessorTemplateElem(),
ElemApplyTemplates.class /* class
object */, 20, true);
XSLTElementDef xslApplyImports =
new XSLTElementDef(this, Constants.S_XSLNAMESPACEURL, "apply-imports",
@@ -364,7 +384,7 @@
null /*alias */, templateElementsAndSort,
// (#PCDATA %instructions; %result-elements; | xsl:sort)*
new XSLTAttributeDef[]{ selectAttrRequired,
spaceAttr },
-
new
ProcessorTemplateElem(),
+ new ProcessorTemplateElem(),
ElemForEach.class /* class object */,
true, false, true, 20, true);
XSLTElementDef xslIf = new XSLTElementDef(this,
Constants.S_XSLNAMESPACEURL,
@@ -381,7 +401,7 @@
testAttrRequired,
spaceAttr }, new
ProcessorTemplateElem(),
ElemWhen.class /* class object */,
-
false, true, 1, true);
+
false, true, 1, true);
XSLTElementDef xslOtherwise = new XSLTElementDef(this,
Constants.S_XSLNAMESPACEURL, "otherwise",
null /*alias */,
@@ -389,13 +409,13 @@
new XSLTAttributeDef[]{ spaceAttr },
new ProcessorTemplateElem(),
ElemOtherwise.class /* class object */,
-
false, false,
2, false);
+ false, false, 2,
false);
XSLTElementDef xslChoose = new XSLTElementDef(this,
Constants.S_XSLNAMESPACEURL, "choose",
null /*alias */,
new XSLTElementDef[]{ xslWhen,
xslOtherwise } /*
elements */,
-
new XSLTAttributeDef[]{
spaceAttr },
+ new XSLTAttributeDef[]{ spaceAttr },
new ProcessorTemplateElem(),
ElemChoose.class /* class object */, true,
false, true, 20, true);
XSLTElementDef xslAttribute = new XSLTElementDef(this,
@@ -405,7 +425,7 @@
new XSLTAttributeDef[]{ nameAVTRequired,
namespaceAVTOpt,
spaceAttr },
-
new
ProcessorTemplateElem(),
+ new ProcessorTemplateElem(),
ElemAttribute.class /* class object */,
20, true);
XSLTElementDef xslCallTemplate =
new XSLTElementDef(this, Constants.S_XSLNAMESPACEURL, "call-template",
@@ -420,7 +440,7 @@
templateElements /* elements */, //
%template;>
new XSLTAttributeDef[]{ nameAttrRequired,
selectAttrOpt },
-
new
ProcessorTemplateElem(),
+ new ProcessorTemplateElem(),
ElemVariable.class /* class object */,
20, true);
XSLTElementDef xslParam = new XSLTElementDef(this,
Constants.S_XSLNAMESPACEURL, "param",
@@ -428,7 +448,7 @@
templateElements /* elements */, //
%template;>
new XSLTAttributeDef[]{ nameAttrRequired,
selectAttrOpt },
-
new ProcessorTemplateElem(),
+ new ProcessorTemplateElem(),
ElemParam.class /* class object */, 19,
true);
XSLTElementDef xslText =
new XSLTElementDef(this, Constants.S_XSLNAMESPACEURL, "text",
@@ -444,7 +464,7 @@
new XSLTAttributeDef[]{
nameAVTRequired,
spaceAttr },
-
new ProcessorTemplateElem(),
+ new ProcessorTemplateElem(),
ElemPI.class /* class object */, 20, true);
XSLTElementDef xslElement = new XSLTElementDef(this,
Constants.S_XSLNAMESPACEURL, "element",
@@ -454,7 +474,7 @@
namespaceAVTOpt,
useAttributeSetsAttr,
spaceAttr },
-
new
ProcessorTemplateElem(),
+ new ProcessorTemplateElem(),
ElemElement.class /* class object */, 20,
true);
XSLTElementDef xslComment = new XSLTElementDef(this,
Constants.S_XSLNAMESPACEURL, "comment",
@@ -469,7 +489,7 @@
new XSLTAttributeDef[]{
spaceAttr,
useAttributeSetsAttr },
-
new ProcessorTemplateElem(),
+ new ProcessorTemplateElem(),
ElemCopy.class /* class object */, 20, true);
XSLTElementDef xslMessage = new XSLTElementDef(this,
Constants.S_XSLNAMESPACEURL, "message",
@@ -485,8 +505,67 @@
new XSLTAttributeDef[]{ spaceAttr },
new ProcessorTemplateElem(),
ElemFallback.class /* class object */,
20, true);
+ //exslt
+ XSLTElementDef exsltFunction =
+ new XSLTElementDef(this,
+ Constants.S_EXSLT_FUNCTIONS_URL,
+ "function",
+ null /*alias */,
+ exsltFunctionElements /* elements */,
+ new XSLTAttributeDef[]{ nameAttrRequired },
+ new ProcessorExsltFunction(),
+ ElemExsltFunction.class /* class object
*/);
+ XSLTElementDef exsltResult =
+ new XSLTElementDef(this,
+ Constants.S_EXSLT_FUNCTIONS_URL,
+ "result",
+ null /*alias */,
+ templateElements /* elements */,
+ new XSLTAttributeDef[]{ selectAttrOpt },
+ new ProcessorExsltFuncResult(),
+ ElemExsltFuncResult.class /* class object
*/);
+
+ //XSLT 2.0
+ XSLTElementDef xslResult = new XSLTElementDef(this,
+ Constants.S_XSLNAMESPACEURL,
+ "result",
+ null /*alias */,
+ templateElements /* elements */,
+ new XSLTAttributeDef[]{ selectAttrOpt },
+ new ProcessorFuncResult(),
+ ElemFuncResult.class /* class object
*/);
+ XSLTElementDef[] xslFunctionElements = new XSLTElementDef[]
+ {xslParam, xslVariable,
+ xslMessage, xslComment,
+ xslResult};
+ XSLTElementDef xslFunction = new XSLTElementDef(this,
+ Constants.S_XSLNAMESPACEURL,
+ "function",
+ null,
+ xslFunctionElements,
+ new XSLTAttributeDef[]{ nameAttrRequired
},
+ new ProcessorFunction(),
+ ElemFunction.class /* class object */);
+
+ XSLTElementDef xslPrincipalResultDocument =
+ new XSLTElementDef(this,
+ Constants.S_XSLNAMESPACEURL,
"principal-result-document",
+ null /*alias */,
+ templateElements,
+ new XSLTAttributeDef[]{resultDocFormatAttr,
hrefAttrOpt},
+ new ProcessorResultDocument(),
+ ElemPrincipalResultDocument.class);
+
+ XSLTElementDef xslResultDocument =
+ new XSLTElementDef(this,
+ Constants.S_XSLNAMESPACEURL,
"result-document",
+ null /*alias */,
+ templateElements,
+ new XSLTAttributeDef[]{resultDocFormatAttr,
hrefAttr},
+ new ProcessorResultDocument(),
+ ElemResultDocument.class);
+
int i = 0;
-
templateElements[i++] = charData; // #PCDATA
// char-instructions
@@ -512,22 +591,22 @@
templateElements[i++] = xslAttribute;
templateElements[i++] = resultElement;
templateElements[i++] = unknownElement;
+ templateElements[i++] = xslResult;
+ templateElements[i++] = exsltResult;
+ templateElements[i++] = xslResultDocument; // May NOT appear in
xslFunction or exsltFunction.
int k;
for (k = 0; k < i; k++)
{
templateElementsAndParams[k] = templateElements[k];
- }
-
- templateElementsAndParams[k] = xslParam;
-
- for (k = 0; k < i; k++)
- {
templateElementsAndSort[k] = templateElements[k];
+ exsltFunctionElements[k] = templateElements[k];
}
-
+ templateElementsAndParams[k] = xslParam;
templateElementsAndSort[k] = xslSort;
+ exsltFunctionElements[k] = xslParam;
+
i = 0;
charTemplateElements[i++] = charData; // #PCDATA
@@ -553,164 +632,184 @@
new XSLTAttributeDef[]{ hrefAttr }, //
EMPTY
new ProcessorImport(),
null /* class object */,
-
1, true);
+ 1, true);
XSLTElementDef includeDef = new XSLTElementDef(this,
Constants.S_XSLNAMESPACEURL, "include",
null /*alias */, null /* elements */, //
EMPTY
new XSLTAttributeDef[]{ hrefAttr },
new ProcessorInclude(),
null /* class object */,
-
20, true);
- XSLTElementDef[] topLevelElements = new XSLTElementDef[]{ includeDef,
- importDef,
- //
resultElement,
- whiteSpaceOnly,
- unknownElement,
- new
XSLTElementDef(
- this,
-
Constants.S_XSLNAMESPACEURL,
-
"strip-space",
- null /*alias
*/,
- null /*
elements */,
- new
XSLTAttributeDef[]{
- elementsAttr
},
- new
ProcessorStripSpace(),
- null /*
class object */, 20, true),
- new
XSLTElementDef(
- this,
-
Constants.S_XSLNAMESPACEURL,
-
"preserve-space",
- null /*alias
*/,
- null /*
elements */,
- new
XSLTAttributeDef[]{
- elementsAttr
},
- new
ProcessorPreserveSpace(),
- null /*
class object */, 20, true),
- new
XSLTElementDef(
- this,
-
Constants.S_XSLNAMESPACEURL,
- "output",
- null /*alias
*/,
- null /*
elements */,
- new
XSLTAttributeDef[]{
- methodAttr,
-
versionAttr,
-
encodingAttr,
-
omitXmlDeclarationAttr,
-
standaloneAttr,
-
doctypePublicAttr,
-
doctypeSystemAttr,
-
cdataSectionElementsAttr,
- indentAttr,
-
mediaTypeAttr,
-
XSLTAttributeDef.m_foreignAttr },
- new
ProcessorOutputElem(), null /* class object */, 20, true),
-
new XSLTElementDef(
- this,
-
Constants.S_XSLNAMESPACEURL,
- "key",
- null
/*alias */,
- null /*
elements */, // EMPTY
- new
XSLTAttributeDef[]{ nameAttrRequired,
-
matchAttrRequired,
-
useAttr },
-
new ProcessorKey(), null /* class object */, 20, true),
- new
XSLTElementDef(
- this,
-
Constants.S_XSLNAMESPACEURL,
-
"decimal-format",
- null /*alias
*/,
- null /*
elements */, // EMPTY
-
new XSLTAttributeDef[]{
-
nameAttrOpt,
-
decimalSeparatorAttr,
-
groupingSeparatorAttr,
-
infinityAttr,
-
minusSignAttr,
-
NaNAttr,
-
percentAttr,
-
perMilleAttr,
-
zeroDigitAttr,
-
digitAttr,
-
patternSeparatorAttr },
-
new ProcessorDecimalFormat(),
- null /*
class object */, 20, true),
- new
XSLTElementDef(
- this,
-
Constants.S_XSLNAMESPACEURL,
-
"attribute-set",
- null /*alias
*/,
- new
XSLTElementDef[]{
- xslAttribute
} /* elements */,
- new
XSLTAttributeDef[]{
-
nameAttrRequired,
-
useAttributeSetsAttr }, new ProcessorAttributeSet(),
-
null /* class object */, 20, true),
- new
XSLTElementDef(
- this,
-
Constants.S_XSLNAMESPACEURL,
- "variable",
- null /*alias
*/,
-
templateElements /* elements */,
- new
XSLTAttributeDef[]{
-
nameAttrRequired,
-
selectAttrOpt }, new ProcessorGlobalVariableDecl(),
-
ElemVariable.class /* class object */, 20, true),
- new
XSLTElementDef(
- this,
-
Constants.S_XSLNAMESPACEURL,
- "param",
- null /*alias
*/,
-
templateElements /* elements */,
- new
XSLTAttributeDef[]{
-
nameAttrRequired,
-
selectAttrOpt }, new ProcessorGlobalParamDecl(),
-
ElemParam.class /* class object */, 20, true),
- new
XSLTElementDef(
- this,
-
Constants.S_XSLNAMESPACEURL,
- "template",
- null /*alias
*/,
-
templateElementsAndParams /* elements */,
- new
XSLTAttributeDef[]{
-
matchAttrOpt,
-
nameAttrOpt,
-
priorityAttr,
- modeAttr,
- spaceAttr
}, new ProcessorTemplate(), ElemTemplate.class /* class object */, 20, true),
-
new XSLTElementDef(
- this,
-
Constants.S_XSLNAMESPACEURL,
-
"namespace-alias",
- null
/*alias */,
- null /*
elements */, // EMPTY
- new
XSLTAttributeDef[]{ stylesheetPrefixAttr,
-
resultPrefixAttr },
-
new ProcessorNamespaceAlias(), null /* class object
*/, 20, true),
- new
XSLTElementDef(
- this,
-
Constants.S_BUILTIN_EXTENSIONS_URL,
- "component",
- null /*alias
*/,
- new
XSLTElementDef[]{
- new
XSLTElementDef(
- this,
-
Constants.S_BUILTIN_EXTENSIONS_URL,
- "script",
- null
/*alias */,
- new
XSLTElementDef[]{ charData } /* elements */,
- new
XSLTAttributeDef[]{
- new
XSLTAttributeDef(
- null,
-
"lang",
-
XSLTAttributeDef.T_NMTOKEN,
-
true),
- new
XSLTAttributeDef(null, "src", XSLTAttributeDef.T_URL, false) },
-
new ProcessorLRE(),
-
ElemExtensionScript.class /* class object */, 20, true) }, // EMPTY
-
new XSLTAttributeDef[]{ new XSLTAttributeDef(null, "prefix",
XSLTAttributeDef.T_NMTOKEN, true),
-
new XSLTAttributeDef(null,
"elements", XSLTAttributeDef.T_STRINGLIST, false),
-
new XSLTAttributeDef(null,
"functions", XSLTAttributeDef.T_STRINGLIST, false) }, new ProcessorLRE(),
ElemExtensionDecl.class /* class object */) };
+ 20, true);
+
+ XSLTElementDef[] topLevelElements = new XSLTElementDef[]
+ {includeDef,
+ importDef,
+ // resultElement,
+ whiteSpaceOnly,
+ unknownElement,
+ new XSLTElementDef(
+ this,
+ Constants.S_XSLNAMESPACEURL,
+ "strip-space",
+ null /*alias */,
+ null /* elements */,
+ new XSLTAttributeDef[]{
+ elementsAttr },
+ new ProcessorStripSpace(),
+ null /* class object */, 20, true),
+ new XSLTElementDef(
+ this,
+ Constants.S_XSLNAMESPACEURL,
+ "preserve-space",
+ null /*alias */,
+ null /* elements */,
+ new XSLTAttributeDef[]{
+ elementsAttr },
+ new
ProcessorPreserveSpace(),
+ null /* class object */, 20, true),
+ new XSLTElementDef(
+ this,
+ Constants.S_XSLNAMESPACEURL,
+ "output",
+ null /*alias */,
+ null /* elements */,
+ new XSLTAttributeDef[]{
+ nameAttrOpt /*2.0-dml */,
+ methodAttr,
+ versionAttr,
+ encodingAttr,
+ omitXmlDeclarationAttr,
+ standaloneAttr,
+ doctypePublicAttr,
+ doctypeSystemAttr,
+ cdataSectionElementsAttr,
+ indentAttr,
+ mediaTypeAttr,
+ includeContentTypeAttr,
+ escapeUriAttributesAttr,
+
XSLTAttributeDef.m_foreignAttr },
+ new ProcessorOutputElem(), null /*
class object */, 20, true),
+ new XSLTElementDef(
+ this,
+ Constants.S_XSLNAMESPACEURL,
+ "key",
+ null /*alias */,
+ null /* elements */, // EMPTY
+ new XSLTAttributeDef[]{
nameAttrRequired,
+ matchAttrRequired,
+ useAttr },
+ new ProcessorKey(), null /* class
object */, 20, true),
+ new XSLTElementDef(
+ this,
+ Constants.S_XSLNAMESPACEURL,
+ "decimal-format",
+ null /*alias */,
+ null /* elements */, // EMPTY
+ new XSLTAttributeDef[]{
+ nameAttrOpt,
+ decimalSeparatorAttr,
+ groupingSeparatorAttr,
+ infinityAttr,
+ minusSignAttr,
+ NaNAttr,
+ percentAttr,
+ perMilleAttr,
+ zeroDigitAttr,
+ digitAttr,
+ patternSeparatorAttr },
+ new ProcessorDecimalFormat(),
+ null /* class object */, 20,
true),
+ new XSLTElementDef(
+ this,
+ Constants.S_XSLNAMESPACEURL,
+ "attribute-set",
+ null /*alias */,
+ new XSLTElementDef[]{
+ xslAttribute } /*
elements */,
+ new XSLTAttributeDef[]{
+ nameAttrRequired,
+ useAttributeSetsAttr },
+ new ProcessorAttributeSet(),
+ null /* class object */, 20,
true),
+ new XSLTElementDef(
+ this,
+ Constants.S_XSLNAMESPACEURL,
+ "variable",
+ null /*alias */,
+ templateElements /* elements */,
+ new XSLTAttributeDef[]{
+ nameAttrRequired,
+ selectAttrOpt },
+ new ProcessorGlobalVariableDecl(),
+ ElemVariable.class /* class
object */, 20, true),
+ new XSLTElementDef(
+ this,
+ Constants.S_XSLNAMESPACEURL,
+ "param",
+ null /*alias */,
+ templateElements /* elements */,
+ new XSLTAttributeDef[]{
+ nameAttrRequired,
+ selectAttrOpt },
+ new ProcessorGlobalParamDecl(),
+ ElemParam.class /* class object
*/, 20, true),
+ new XSLTElementDef(
+ this,
+ Constants.S_XSLNAMESPACEURL,
+ "template",
+ null /*alias */,
+ templateElementsAndParams /*
elements */,
+ new XSLTAttributeDef[]{
+ matchAttrOpt,
+ nameAttrOpt,
+ priorityAttr,
+ modeAttr,
+ spaceAttr },
+ new ProcessorTemplate(),
ElemTemplate.class /* class object */, true, 20, true),
+ new XSLTElementDef(
+ this,
+ Constants.S_XSLNAMESPACEURL,
+ "namespace-alias",
+ null /*alias */,
+ null /* elements */, // EMPTY
+ new XSLTAttributeDef[]{
+ stylesheetPrefixAttr,
+ resultPrefixAttr },
+ new ProcessorNamespaceAlias(),
null /* class object */, 20, true),
+ new XSLTElementDef(
+ this,
+
Constants.S_BUILTIN_EXTENSIONS_URL,
+ "component",
+ null /*alias */,
+ new XSLTElementDef[]{
+ new XSLTElementDef(
+ this,
+
Constants.S_BUILTIN_EXTENSIONS_URL,
+ "script",
+ null /*alias */,
+ new XSLTElementDef[]{
+ charData } /*
elements */,
+ new
XSLTAttributeDef[]{
+ new
XSLTAttributeDef(
+ null,
+ "lang",
+
XSLTAttributeDef.T_NMTOKEN,
+ true),
+ new
XSLTAttributeDef(
+ null, "src",
XSLTAttributeDef.T_URL, false) },
+ new
ProcessorLRE(),
+
ElemExtensionScript.class /* class object */, 20, true) }, // EMPTY
+ new
XSLTAttributeDef[]{
+ new
XSLTAttributeDef(
+ null,
"prefix", XSLTAttributeDef.T_NMTOKEN, true),
+ new
XSLTAttributeDef(
+ null,
"elements", XSLTAttributeDef.T_STRINGLIST, false),
+ new
XSLTAttributeDef(
+ null,
"functions", XSLTAttributeDef.T_STRINGLIST, false) },
+ new ProcessorLRE(),
ElemExtensionDecl.class /* class object */),
+ exsltFunction, xslFunction/* exslt,
stylesheet function*/,
+ xslPrincipalResultDocument}; //end of
topevelElements
+
XSLTAttributeDef excludeResultPrefixesAttr =
new XSLTAttributeDef(null, "exclude-result-prefixes",
XSLTAttributeDef.T_STRINGLIST, false);
1.12.18.1 +18 -4
xml-xalan/java/src/org/apache/xalan/processor/ProcessorOutputElem.java
Index: ProcessorOutputElem.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorOutputElem.java,v
retrieving revision 1.12
retrieving revision 1.12.18.1
diff -u -r1.12 -r1.12.18.1
--- ProcessorOutputElem.java 2 Jan 2001 03:36:42 -0000 1.12
+++ ProcessorOutputElem.java 4 Jun 2002 19:52:38 -0000 1.12.18.1
@@ -72,6 +72,7 @@
import org.xml.sax.Attributes;
+
/**
* TransformerFactory for xsl:output markup.
* @see <a href="http://www.w3.org/TR/xslt#dtd">XSLT DTD</a>
@@ -79,7 +80,7 @@
*/
class ProcessorOutputElem extends XSLTElementProcessor
{
-
+
/** The output properties, set temporarily while the properties are
* being set from the attributes, and then nulled after that operation
* is completed. */
@@ -90,7 +91,7 @@
* @see javax.xml.transform.OutputKeys#CDATA_SECTION_ELEMENTS
* @param newValue non-null reference to processed attribute value.
*/
- public void setCdataSectionElements(java.util.Vector newValue)
+ public void setCdataSectionElements(java.util.Vector newValue, QName qname)
{
m_outputProperties.setQNameProperties(OutputKeys.CDATA_SECTION_ELEMENTS,
newValue);
}
@@ -204,6 +205,18 @@
QName key = new QName(attrUri, attrLocalName);
m_outputProperties.setProperty(key, attrValue);
}
+
+ //XSLT 2.0
+
+ public void setName(QName v)
+ {
+ m_outputProperties.setQNameProperty("name", v);
+ }
+
+ public QName getName()
+ {
+ return m_outputProperties.getQNameProperty("name");
+ }
/**
* Receive notification of the start of an xsl:output element.
@@ -234,7 +247,7 @@
m_outputProperties.setLocaterInfo(handler.getLocator());
m_outputProperties.setUid(handler.nextUid());
setPropertiesFromAttributes(handler, rawName, attributes, this);
-
+
// Access this only from the Hashtable level... we don't want to
// get default properties.
String entitiesFileName =
@@ -254,7 +267,8 @@
}
}
- handler.getStylesheet().setOutput(m_outputProperties);
+ // for 2.0, can have multiple output properties, identified by name.
+ handler.getStylesheet().setOutput(m_outputProperties);
ElemTemplateElement parent = handler.getElemTemplateElement();
parent.appendChild(m_outputProperties);
No revision
No revision
1.2.2.1 +0 -0
xml-xalan/java/src/org/apache/xalan/processor/Attic/ProcessorResultDocument.java
1.2.2.1 +1 -1
xml-xalan/java/src/org/apache/xalan/processor/Attic/ProcessorFunction.java
1.2.2.1 +0 -0
xml-xalan/java/src/org/apache/xalan/processor/Attic/ProcessorFuncResult.java
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
