public XPathVersion(string value) { if (value.Equals(XPathVersion10)) { this._xPathVersion = XPathVersion10AnyURI; } else if (value.Equals(XPathVersion20)) { this._xPathVersion = XPathVersion20AnyURI; } else { throw new Indeterminate(Indeterminate.IndeterminateSyntaxError); } }
public XPathVersion(Node node) { string txt = node.TextContent.Trim(); if (txt.Equals(XPathVersion10)) { this._xPathVersion = XPathVersion10AnyURI; } else if (txt.Equals(XPathVersion20)) { this._xPathVersion = XPathVersion20AnyURI; } else { throw new Indeterminate(Indeterminate.IndeterminateSyntaxError); } }
public Match(Node node) { Node matchidnode = node.Attributes.GetNamedItem("MatchId"); if (matchidnode != null) { this._matchId = new AnyURIDataType(matchidnode.NodeValue); } else { throw new Indeterminate(Indeterminate.IndeterminateSyntaxError); } this._evaluatable = null; this._attributeValue = null; NodeList children = node.ChildNodes; for (int i = 0; i < children.Length; i++) { Node child = children.Item(i); if (child.NodeName.Trim().Equals(AttributeValue.stringIdentifer)) { this._attributeValue = new AttributeValue(child); } else if (this._evaluatable == null && child.NodeName.Trim().Equals(AttributeDesignator.stringIdentifer)) { this._evaluatable = new AttributeDesignator(child); } else if (this._evaluatable == null && child.NodeName.Trim().Equals(AttributeSelector.stringIdentifer)) { this._evaluatable = new AttributeSelector(child); } } if (this._evaluatable == null || this._attributeValue == null) { throw new Indeterminate(Indeterminate.IndeterminateSyntaxError); } }
public Attributes(Node node) { this._category = new AnyURIDataType(node.Attributes.GetNamedItem("Category").NodeValue); if (this._category == null) { throw new Indeterminate(Indeterminate.IndeterminateSyntaxError); } this._attributes = new List <Attribute>(); NodeList children = node.ChildNodes; this._content = null; for (int i = 0; i < children.Length; i++) { Node child = children.Item(i); if (child.NodeName.Equals("Attribute")) { this._attributes.Add(Attribute.GetInstance(child)); } else if (child.NodeName.Equals("Content")) { this._content = Content.GetInstance(child); } } }
public DataTypeValue GetInstance(Node node) { return(AnyURIDataType.GetInstance(node)); }
public DataTypeValue GetInstance(string value) { return(AnyURIDataType.GetInstance(value)); }
public Attribute(Node node) { if (!node.NodeName.Equals(Identifer)) { throw new Indeterminate(Indeterminate.IndeterminateSyntaxError); } NamedNodeMap attributes = node.Attributes; Node idnode = attributes.GetNamedItem("AttributeId"); if (idnode != null) { this._attributeId = new AnyURIDataType(idnode.NodeValue); } else { throw new Indeterminate(Indeterminate.IndeterminateSyntaxError); } Node includeinresultnode = attributes.GetNamedItem("IncludeInResult"); if (includeinresultnode != null) { string value = includeinresultnode.NodeValue.Trim(); if (value.EqualsIgnoreCase("true")) { this._includeInResult = BooleanDataType.True; } else { this._includeInResult = BooleanDataType.False; } } else { throw new Indeterminate(Indeterminate.IndeterminateSyntaxError); } Node issuernode = attributes.GetNamedItem("Issuer"); if (issuernode != null) { this._issuer = new StringDataType(issuernode.NodeValue); } this._attributeValues = new List <AttributeValue>(); NodeList children = node.ChildNodes; for (int i = 0; i < children.Length; i++) { Node child = children.Item(i); if (child.NodeName.Equals("AttributeValue")) { this._attributeValues.Add((AttributeValue)AttributeValue.GetInstance(child)); } } if (this._attributeValues.Count == 0) { throw new Indeterminate(Indeterminate.IndeterminateSyntaxError); } }