public static XmlQualifiedName FromString(string name, IStaticXsltContext ctx) { int num = name.IndexOf(':'); if (num > 0) { return(new XmlQualifiedName(name.Substring(num + 1), ctx.LookupNamespace(name.Substring(0, num)))); } if (num < 0) { return(new XmlQualifiedName(name, string.Empty)); } throw new ArgumentException("Invalid name: " + name); }
public static QName FromString(string name, IStaticXsltContext ctx) { int colon = name.IndexOf(':'); if (colon > 0) { return(new QName(name.Substring(colon + 1), ctx.LookupNamespace(name.Substring(0, colon)))); } else if (colon < 0) { // Default namespace is not used for unprefixed names. return(new QName(name, "")); } else { throw new ArgumentException("Invalid name: " + name); } }
public static QName FromString (string name, IStaticXsltContext ctx) { int colon = name.IndexOf (':'); if (colon > 0) return new QName (name.Substring (colon + 1), ctx.LookupNamespace (name.Substring (0, colon))); else if (colon < 0) // Default namespace is not used for unprefixed names. return new QName (name, ""); else throw new ArgumentException ("Invalid name: " + name); }