XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Ethan SteinSubject: arrayindexoutofbounds with ddtekjava recrusive call
Author: Ethan Stein
Date: 13 Dec 2011 05:24 PM
I want to be able to traverse a document and if a node in the document contains a particular piece of information, then I want to append data to an external node built with ddtekjava/DOM.

When I've added all the nodes together, I want to then write them t a file. I've tried to do this with a combination of ddtekjava and XQuery, but every time I go to return the node, it gives me an arrayindexoutofbounds error:

java.lang.ArrayIndexOutOfBoundsException: 0

at com.ddtek.xquery.mediator.normalize.SaxonDenormalizeVisitor$IsScopeSensitiveVisitor.visitUserDefined(SaxonDenormalizeVisitor.java:6956)
at com.ddtek.xquery.mediator.normalize.AbstractIsScopeSensitiveVisitor.visit(AbstractIsScopeSensitiveVisitor.java:152)
at com.ddtek.xquery.expr.FunctionCall.accept(FunctionCall.java:224)
at com.ddtek.xquery.mediator.normalize.SaxonDenormalizeVisitor$IsScopeSensitiveVisitor.isScopeSensitive(SaxonDenormalizeVisitor.java:6938)
at com.ddtek.xquery.mediator.normalize.SaxonDenormalizeVisitor.inlineLetVariables(SaxonDenormalizeVisitor.java:5731)
at com.ddtek.xquery.mediator.normalize.SaxonDenormalizeVisitor.visit(SaxonDenormalizeVisitor.java:2053)
at com.ddtek.xquery.expr.FLWORExpr.accept(FLWORExpr.java:204)
at com.ddtek.xquery.expr.SubstituteVisitor.visit(SubstituteVisitor.java:639)
at com.ddtek.xquery.expr.IfExpr.accept(IfExpr.java:108)
at com.ddtek.xquery.expr.SubstituteVisitor.visit(SubstituteVisitor.java:1115)
at com.ddtek.xquery.expr.VarDecl.accept(VarDecl.java:597)
at com.ddtek.xquery.expr.SubstituteVisitor.visit(SubstituteVisitor.java:522)
at com.ddtek.xquery.expr.DefaultExpressionList.accept(DefaultExpressionList.java:376)
at com.ddtek.xquery.expr.SubstituteVisitor.visit(SubstituteVisitor.java:551)
at com.ddtek.xquery.mediator.normalize.SaxonDenormalizeVisitor.visit(SaxonDenormalizeVisitor.java:2045)
at com.ddtek.xquery.expr.FLWORExpr.accept(FLWORExpr.java:204)
at com.ddtek.xquery.expr.SubstituteVisitor.substitute(SubstituteVisitor.java:67)
at com.ddtek.xquery.mediator.normalize.TomBaseSubstitutionVisitor.substitute(TomBaseSubstitutionVisitor.java:2631)
at com.ddtek.xquery.NamespaceScopeVisitor.scopeNamespaces(NamespaceScopeVisitor.java:223)
at com.ddtek.xquery.NamespaceScopeVisitor.scopeNamespaces(NamespaceScopeVisitor.java:175)
at com.ddtek.xquery.mediator.normalize.TomBaseSubstitutionVisitor.substituteAll(TomBaseSubstitutionVisitor.java:2618)
at com.ddtek.xquery.mediator.normalize.SaxonDenormalizeVisitor.denormalize(SaxonDenormalizeVisitor.java:1920)
at com.ddtek.xquery.mediator.xtuple.ExpressionEvaluator.addExpressionForSaxonSource(ExpressionEvaluator.java:1467)
at com.ddtek.xquery.mediator.plan.SaxonSourcePhysOpImpl.<init>(SaxonSourcePhysOpImpl.java:159)
at com.ddtek.xquery.mediator.plan.ExecutionPlanGeneratorVisitor.visit(ExecutionPlanGeneratorVisitor.java:1003)
at com.ddtek.xquery.mediator.algebra.XSource.accept(XSource.java:843)
at com.ddtek.xquery.mediator.plan.ExecutionPlanGeneratorVisitor.visit(ExecutionPlanGeneratorVisitor.java:357)
at com.ddtek.xquery.mediator.algebra.XDJoin.accept(XDJoin.java:59)
at com.ddtek.xquery.mediator.plan.ExecutionPlanGeneratorVisitor.visit(ExecutionPlanGeneratorVisitor.java:696)
at com.ddtek.xquery.mediator.algebra.XLet.accept(XLet.java:352)
at com.ddtek.xquery.mediator.plan.ExecutionPlanGeneratorVisitor.visit(ExecutionPlanGeneratorVisitor.java:357)
at com.ddtek.xquery.mediator.algebra.XDJoin.accept(XDJoin.java:59)
at com.ddtek.xquery.mediator.plan.ExecutionPlanGeneratorVisitor.visit(ExecutionPlanGeneratorVisitor.java:745)
at com.ddtek.xquery.mediator.algebra.XProject.accept(XProject.java:133)
at com.ddtek.xquery.mediator.plan.ExecutionPlanGeneratorVisitor.visit(ExecutionPlanGeneratorVisitor.java:199)
at com.ddtek.xquery.mediator.algebra.XDJoin.accept(XDJoin.java:59)
at com.ddtek.xquery.mediator.plan.ExecutionPlanGeneratorVisitor.visit(ExecutionPlanGeneratorVisitor.java:745)
at com.ddtek.xquery.mediator.algebra.XProject.accept(XProject.java:133)
at com.ddtek.xquery.mediator.plan.ExecutionPlanGeneratorVisitor.visit(ExecutionPlanGeneratorVisitor.java:195)
at com.ddtek.xquery.mediator.algebra.XDJoin.accept(XDJoin.java:59)
at com.ddtek.xquery.mediator.plan.ExecutionPlanGeneratorVisitor.visit(ExecutionPlanGeneratorVisitor.java:846)
at com.ddtek.xquery.mediator.algebra.XReturn.accept(XReturn.java:216)
at com.ddtek.xquery.mediator.plan.ExecutionPlanGeneratorVisitor.generate(ExecutionPlanGeneratorVisitor.java:148)
at com.ddtek.xquery.mediator.plan.ExecutionPlanImpl.generate(ExecutionPlanImpl.java:186)
at com.ddtek.xquery.mediator.ContextFactory.prepare(ContextFactory.java:449)
at com.ddtek.xquery.mediator.ContextFactory.prepareQuery(ContextFactory.java:304)
at com.ddtek.xquery.xqj.DDXQAbstractExpression.createOrGetExecutionContext(DDXQAbstractExpression.java:512)
at com.ddtek.xquery.xqj.DDXQAbstractExpression.createOrGetExecutionContext(DDXQAbstractExpression.java:481)
at com.ddtek.xquery.xqj.DDXQPreparedExpression.<init>(DDXQPreparedExpression.java:37)
at com.ddtek.xquery.xqj.DDXQConnection.prepareExpression(DDXQConnection.java:243)

---------------------------------------------------------------

Here is the XQuery I am using:

declare namespace xfc = 'ddtekjava:XQueryFileCheck';
declare namespace xbef = 'ddtekjava:BuildErrorFile';

declare option ddtek:xml-streaming 'yes';
declare option ddtek:serialize "indent=yes, omit-xml-declaration=no";

(: external reference to XML document :)
declare variable $xPRSXMLInput as document-node() external;

(: Error File creation functions :)
declare function xbef:BuildErrorFile($inFile as xs:string) as ddtek:javaObject external;
declare function xbef:addNode($errorBuilder as ddtek:javaObject, $newElm as element()) as document-node() external;
declare function xbef:returnErrorDoc($errorBuilder as ddtek:javaObject) as document-node() external;

(: Retrieves the size of a white space or red/gold space from a seocndary file and inserts it into the node :)
declare function local:replaceElms($buildErrFunc as ddtek:javaObject, $n as element(), $acctRecNum as xs:string, $errorNode as element()) as element() {

let $newErrorNode := xbef:addNode($buildErrFunc, <MESSAGE_WHITE_SPACE>{concat("The white space size (for VISA region 01B) for &quot;", $acctRecNum, ".xml&quot; could not be found. Please check the xDoc output.")}</MESSAGE_WHITE_SPACE>)
return $newErrorNode/*
};

(: Retrieves the size of the message from a secondary file and inserts it into the message node :)
declare function local:processMessageNode($buildErrFunc as ddtek:javaObject, $n as element(), $acctRecNum as xs:string, $errorNode as element()) as element() {

let $newErrorNode := xbef:addNode($buildErrFunc, <MESSAGE_ERROR>
{$n/MESSAGE_TOOL_PK}
<MESSAGE_MESSAGE>{concat("The message size (for VISA region 01A) for &quot;", $acctRecNum, "_", $n/MESSAGE_TOOL_PK/text(), ".xml&quot; could not be found. Please check the xDoc output.")}</MESSAGE_MESSAGE>
</MESSAGE_ERROR>)
return $newErrorNode/*
};


(: Calls subfunctions to add specific nodes or data values :)
declare function local:updateNodes($buildErrFunc as ddtek:javaObject, $n as element(), $recNumber as xs:string, $errorNode as element()) as element()*
{
if ((local-name($n) eq 'WHITE_SPACE_SIZE') or (local-name($n) eq 'RED_GOLD_SIZE')) then local:replaceElms($buildErrFunc, $n, $recNumber, $errorNode)
else if (local-name($n) eq 'MESSAGE') then local:processMessageNode($buildErrFunc, $n, $recNumber, $errorNode)
else
(element { name($n) } {$n/@*,
($n/text(),
for $child in $n/*
return local:updateNodes($buildErrFunc, $child, $recNumber, $errorNode))})
};

let $buildErrFunc := xbef:BuildErrorFile("errorfile.xml")
let $errorNode := xbef:returnErrorDoc($buildErrFunc)/*
return
<VISA_DATA xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="VISA_DATA.xsd">
{for $acctRec in $xPRSXMLInput/VISA_DATA/ACCOUNT_RECORD
let $acctRecNumber := $acctRec/ACCOUNT_RECORD_KEY_PK/text()
return
local:updateNodes($buildErrFunc, $acctRec, $acctRecNumber, $errorNode)
}
</VISA_DATA>

------------------------------------------------------

Here is the XML file:

<?xml version="1.0" encoding="ISO-8859-1"?>
<VISA_DATA>
<ACCOUNT_RECORD>
<WHITE_SPACE_SIZE>0</WHITE_SPACE_SIZE>
<RED_GOLD_SIZE>0</RED_GOLD_SIZE>
<STATEMENT_TOTAL_PAGES>0</STATEMENT_TOTAL_PAGES>
<MESSAGE>
<MESSAGE_ASCII_RECORD_ORDER_NUM>000014</MESSAGE_ASCII_RECORD_ORDER_NUM>
<MESSAGE_TOOL_PK>0318</MESSAGE_TOOL_PK>
<MESSAGE_NUMBER>18</MESSAGE_NUMBER>
<PRIORITY>X</PRIORITY>
<MESSAGE_SIZE>0</MESSAGE_SIZE>
<REGION>
<MESSAGE_REGION>X</MESSAGE_REGION>
<REGION_TEMPLATE>T</REGION_TEMPLATE>
<MESSAGE_CONTENT>X</MESSAGE_CONTENT>
<OPTIONAL_TEXT_2>X</OPTIONAL_TEXT_2>
<OPTIONAL_TEXT_5>X</OPTIONAL_TEXT_5>
<OPTIONAL_TEXT_6>X</OPTIONAL_TEXT_6>
<OPTIONAL_TEXT_7>X</OPTIONAL_TEXT_7>
</REGION>
<MESSAGE_TYPE>X</MESSAGE_TYPE>
<MESSAGE_PACKAGE>X</MESSAGE_PACKAGE>
</MESSAGE>
</ACCOUNT_RECORD>
</VISA_DATA>

------------------------------------------

And here is my code:

private Document errorDoc = null;

/***
* Builds error file and Document instance
* @param fileName file to create
* @param newFile decides whether to create a new file or add to an existing one
*/
public BuildErrorFile(String inFile) {


try {
File errorFile = new File(inFile);

DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);

DocumentBuilder builder = factory.newDocumentBuilder();

if (!errorFile.exists()) {
errorDoc = builder.newDocument();
Element rootElm = errorDoc.createElement("Errors");
rootElm.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xsi",
"http://www.w3.org/2001/XMLSchema-instance");
rootElm.setAttribute("xsi:schemaLocation", "ErrorNodes.xsd");

errorDoc.appendChild(rootElm);
} else
errorDoc = builder.parse(errorFile);

Node newErrorNode = errorDoc.createElement("ErrorNode");
Node firstNode = errorDoc.getFirstChild();
firstNode.appendChild(newErrorNode);

} catch (ParserConfigurationException e) {
e.printStackTrace();
} catch (SAXException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}

/***
* Adds Element to Document
* @param elm Element to add
*/
public Document addNode(Element newElm) {
//Node elmNode = refElm.getOwnerDocument().adoptNode(newElm);
try {
Node elmNode = errorDoc.adoptNode(newElm);
errorDoc.getLastChild().getLastChild().appendChild(elmNode);
return errorDoc;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}

public Document returnErrorDoc() {
return errorDoc;
}

-----------------------

I'm hoping someone might know what I'm doing wrong.

Anyone have any ideas.

Postnext
Ivan PedruzziSubject: arrayindexoutofbounds with ddtekjava recrusive call
Author: Ivan Pedruzzi
Date: 13 Dec 2011 11:10 PM
Hi Ethan,

The attached solution avoid using Java extensions that seems to confuse the XQuery optimizer but should be functionally equivalent

Does it help?

Ivan Pedruzzi
Stylus Studio Team


Documentquery_NoJava.zip

Postnext
Ethan SteinSubject: arrayindexoutofbounds with ddtekjava recrusive call
Author: Ethan Stein
Date: 13 Dec 2011 11:32 PM
Nice, I didn't realize there was a doc-available functionality. I will see if it will work.

Thanks.

Postnext
Ethan SteinSubject: arrayindexoutofbounds with ddtekjava recrusive call
Author: Ethan Stein
Date: 13 Dec 2011 11:58 PM
So, I was able to remove the functions, which makes things more portable, but as it stands, the function won't write anything to the file system because I'm not actually using the variable. So I changed it to this and now it doesn't produce the log file (although it does produce an XML result):


declare option ddtek:xml-streaming 'yes';
declare option ddtek:serialize "indent=yes, omit-xml-declaration=no";

(: external reference to XML document :)
declare variable $xPRSXMLInput as document-node() external;

declare variable $logURL := "log.xml";
declare function local:addNode($error as element()) as element()*
{
let $errLog := if(fn:doc-available($logURL)) then
doc($logURL)/Errors
else ()
let $newLog :=
<Errors
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="ErrorNodes.xsd">
{
$errLog/*,
$error
}
</Errors>

return (
ddtek:serialize-to-url($newLog, $logURL,""),
$newLog
)
};


(: Retrieves the size of a white space or red/gold space from a secondary file and inserts it into the node :)
declare function local:replaceElms($n as element(), $acctRecNum as xs:string) as element()*
{
let $whitespacemsg := local:addNode(
<MESSAGE_WHITE_SPACE>{
concat("The white space size (for VISA region 01B) for &quot;",
$acctRecNum,
".xml&quot; could not be found. Please check the xDoc output.")
}</MESSAGE_WHITE_SPACE>
)
return <A_DIFFERENT_MESSAGE>This is a white space message</A_DIFFERENT_MESSAGE>
};

(: Retrieves the size of the message from a secondary file and inserts it into the message node :)
declare function local:processMessageNode($n as element(), $acctRecNum as xs:string) as element()*
{
let $msgErroNode := local:addNode(
<MESSAGE_ERROR>
{$n/MESSAGE_TOOL_PK}
<MESSAGE_MESSAGE>{
concat("The message size (for VISA region 01A) for &quot;",
$acctRecNum, "_",
$n/MESSAGE_TOOL_PK/text(),
".xml&quot; could not be found. Please check the xDoc output.")
}</MESSAGE_MESSAGE>
</MESSAGE_ERROR>
)
return <SOME_OTHER_MESSAGE>this is another message</SOME_OTHER_MESSAGE>
};


(: Calls subfunctions to add specific nodes or data values :)
declare function local:updateNodes($n as element(), $recNumber as xs:string) as element()*
{
if ((local-name($n) eq 'WHITE_SPACE_SIZE') or (local-name($n) eq 'RED_GOLD_SIZE')) then
local:replaceElms($n, $recNumber)
else if (local-name($n) eq 'MESSAGE') then
local:processMessageNode($n, $recNumber)
else
element { name($n) }
{
(
$n/@*,
$n/text(),
for $child in $n/*
return local:updateNodes($child, $recNumber)
)
}

};


<VISA_DATA
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="VISA_DATA.xsd">
{
for $acctRec in $xPRSXMLInput/VISA_DATA/ACCOUNT_RECORD
let $acctRecNumber := $acctRec/ACCOUNT_RECORD_KEY_PK/text()
return local:updateNodes($acctRec, $acctRecNumber)
}
</VISA_DATA>


I noticed this with the ddtekjava functions as well. Any idea?

Postnext
Ethan SteinSubject: arrayindexoutofbounds with ddtekjava recrusive call
Author: Ethan Stein
Date: 14 Dec 2011 12:03 AM
I saw your other response regarding empty-sequence and did the same for local:addNode.

Now it works, thanks!

Postnext
Ethan SteinSubject: arrayindexoutofbounds with ddtekjava recrusive call
Author: Ethan Stein
Date: 14 Dec 2011 12:11 AM
Actually, when I try to change it to empty-sequence() for local:addNode, I get the following error:

javax.xml.xquery.XQQueryException: [DataDirect][XQuery][err:XPTY0004]Error at line 11, column 2. Static type error. Type 'element(Errors, xs:anyType)' does not match return type 'empty-sequence()' from the declaration of function 'local:addNode'. [Call stack: local:updateNodes@89.9, local:replaceElms@66.3, local:addNode@34.24]

at com.ddtek.xquery.xqj.Util.createXQQueryException(Util.java:341)

at com.ddtek.xquery.xqj.Util.createXQException(Util.java:241)

at com.ddtek.xquery.xqj.DDXQAbstractExpression.createOrGetExecutionContext(DDXQAbstractExpression.java:519)

at com.ddtek.xquery.xqj.DDXQAbstractExpression.createOrGetExecutionContext(DDXQAbstractExpression.java:481)

at com.ddtek.xquery.xqj.DDXQPreparedExpression.<init>(DDXQPreparedExpression.java:37)

at com.ddtek.xquery.xqj.DDXQConnection.prepareExpression(DDXQConnection.java:243)

Caused by: com.ddtek.xquery.typing.TypeVisitor$TypeVisitorException: [XPTY000409][DataDirect][XQuery][err:XPTY0004]Static type error. Type 'element(Errors, xs:anyType)' does not match return type 'empty-sequence()' from the declaration of function 'local:addNode'. [Call stack: local:updateNodes@89.9, local:replaceElms@66.3, local:addNode@34.24]

at com.ddtek.xquery.typing.TypeVisitor.createException(TypeVisitor.java:5111)

at com.ddtek.xquery.typing.TypeVisitor.throwException(TypeVisitor.java:5056)

at com.ddtek.xquery.typing.TypeVisitor.typeFunctionDecl(TypeVisitor.java:8125)

at com.ddtek.xquery.typing.TypeVisitor.typeFunctionCallInlined(TypeVisitor.java:8079)

at com.ddtek.xquery.mediator.ContextFactory$MediatorTypeVisitor.typeFunctionCallInlined(ContextFactory.java:789)

at com.ddtek.xquery.typing.TypeVisitor.typeFunctionCall(TypeVisitor.java:7904)

at com.ddtek.xquery.typing.TypeVisitor.visit(TypeVisitor.java:2961)

at com.ddtek.xquery.expr.FunctionCall.accept(FunctionCall.java:224)

at com.ddtek.xquery.expr.AllExpressionVisitor.visit(AllExpressionVisitor.java:695)

at com.ddtek.xquery.typing.TypeVisitor.visit(TypeVisitor.java:4756)

at com.ddtek.xquery.expr.VarDecl.accept(VarDecl.java:597)

at com.ddtek.xquery.typing.TypeVisitor.visit(TypeVisitor.java:2724)

at com.ddtek.xquery.expr.FLWORExpr.accept(FLWORExpr.java:204)

at com.ddtek.xquery.typing.TypeVisitor.typeFunctionCallInlined(TypeVisitor.java:8077)

at com.ddtek.xquery.mediator.ContextFactory$MediatorTypeVisitor.typeFunctionCallInlined(ContextFactory.java:789)

at com.ddtek.xquery.typing.TypeVisitor.typeFunctionCall(TypeVisitor.java:7904)

at com.ddtek.xquery.typing.TypeVisitor.visit(TypeVisitor.java:2961)

at com.ddtek.xquery.expr.FunctionCall.accept(FunctionCall.java:224)

at com.ddtek.xquery.typing.TypeVisitor.visit(TypeVisitor.java:3138)

at com.ddtek.xquery.expr.IfExpr.accept(IfExpr.java:108)

at com.ddtek.xquery.typing.TypeVisitor.typeFunctionCallInlined(TypeVisitor.java:7993)

at com.ddtek.xquery.mediator.ContextFactory$MediatorTypeVisitor.typeFunctionCallInlined(ContextFactory.java:789)

at com.ddtek.xquery.typing.TypeVisitor.typeFunctionCall(TypeVisitor.java:7904)

at com.ddtek.xquery.typing.TypeVisitor.visit(TypeVisitor.java:2961)

at com.ddtek.xquery.expr.FunctionCall.accept(FunctionCall.java:224)

at com.ddtek.xquery.typing.TypeVisitor.visit(TypeVisitor.java:2794)

at com.ddtek.xquery.expr.FLWORExpr.accept(FLWORExpr.java:204)

at com.ddtek.xquery.expr.AllExpressionVisitor.visit(AllExpressionVisitor.java:309)

at com.ddtek.xquery.expr.DefaultExpressionList.accept(DefaultExpressionList.java:376)

at com.ddtek.xquery.expr.AllExpressionVisitor.visit(AllExpressionVisitor.java:284)

at com.ddtek.xquery.typing.TypeVisitor.visit(TypeVisitor.java:2266)

at com.ddtek.xquery.expr.DirElemConstructor.accept(DirElemConstructor.java:188)

at com.ddtek.xquery.expr.AllExpressionVisitor.visit(AllExpressionVisitor.java:455)

at com.ddtek.xquery.typing.TypeVisitor.visit(TypeVisitor.java:3450)

at com.ddtek.xquery.expr.MainModule.accept(MainModule.java:57)

at com.ddtek.xquery.typing.TypeVisitor.typeExpression(TypeVisitor.java:740)

at com.ddtek.xquery.mediator.ContextFactory$MediatorTypeVisitor.typeExpression(ContextFactory.java:581)

at com.ddtek.xquery.mediator.ContextFactory.prepareQuery(ContextFactory.java:254)

at com.ddtek.xquery.xqj.DDXQAbstractExpression.createOrGetExecutionContext(DDXQAbstractExpression.java:512)

... 3 more

Posttop
Ethan SteinSubject: arrayindexoutofbounds with ddtekjava recrusive call
Author: Ethan Stein
Date: 14 Dec 2011 12:37 AM
Nevermind, I figured it out. I got it to work by modifying your code:

declare function local:addNode($error as element()) as empty-sequence()
{
let $errLog := if(fn:doc-available($logURL)) then
doc($logURL)/Errors
else ()
let $newLog :=
<Errors
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="ErrorNodes.xsd">
{
$errLog/*,
$error
}
</Errors>

return ddtek:serialize-to-url($newLog, $logURL,"indent=yes, omit-xml-declaration=no")
};

And I call it like so:

let $nodeAdded := local:addNode(<MESSAGE_WHITE_SPACE>{concat("The white space size (for VISA region 01B) for &quot;", $acctRecNum, ".xml&quot; could not be found. Please check the xDoc output.")}</MESSAGE_WHITE_SPACE>)
return ($nodeAdded,$n))

The trick was I was missing the () around the return values so it wasn't picking them up. Thanks!

 
Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.