/// /// <summary> * For KElement 'elem' takes information from parent and children about /// * original and corrected CapXPaths, compare them and set CapXPath as a /// * complete path to this element.<br> /// * Checks CapXPath's for every InvalidResource element of the given XMLDoc /// * and all children (of arbitrary depth). Appends right ancestors if /// * CapXPath is not complete.<br> /// * </summary> /// * <param name="elem"> /// * "pool" element like "InvalidElements" or "InvalidAttributes".<br> /// * From this element we have access to its parent and children /// * and can compare their CapXPath's </param> /// * <param name="originalPath"> /// * parent CapXPath before correction. </param> /// private static void capXPathCorrection_Static(KElement elem, string originalPath) { string parentPath = elem.getParentNode_KElement().getAttribute("CapXPath"); VElement vEl = elem.getChildElementVector(null, null, null, true, 0, false); for (int i = 0; i < vEl.Count; i++) { KElement child = (KElement)vEl[i]; string childPath = child.getAttribute("CapXPath"); if (!parentPath.Equals(JDFConstants.EMPTYSTRING) && !childPath.Equals(JDFConstants.EMPTYSTRING)) { string childPathPart = childPath; if (childPath.StartsWith(originalPath)) { childPathPart = childPath.Substring(originalPath.Length + 1); // +1 removes // "/" } child.setAttribute("CapXPath", parentPath + "/" + childPathPart); // recursion to set everywhere the right CapXPath VElement vSubEl = child.getChildElementVector(null, null, null, true, 0, false); for (int j = 0; j < vSubEl.Count; j++) { capXPathCorrection_Static(vSubEl[j], childPath); } } } return; }
/// /// <summary> * get the <seealso cref="JDFStatusQuParams"/> that apply to the jobphase /// * /// * @return </summary> /// public virtual JDFStatusQuParams getStatusQuParams() { KElement parent = getParentNode_KElement(); if (!(parent is JDFDeviceInfo)) { return(null); } parent = parent.getParentNode_KElement(); if (!(parent is JDFMessage)) { return(null); } return(((JDFMessage)parent).getStatusQuParams()); }