private INode ParseObjectResource(RdfACoreParserContext context, IRdfAEvent evt) { if (evt.HasAttribute("resource")) { return(this.ParseResourceAttibute(context, evt)); } else if (evt.HasAttribute("href")) { return(this.ParseHrefAttribute(context, evt)); } else { return(null); } }
public override void ParseLiteralLanguage(RdfACoreParserContext context, IRdfAEvent evt) { if (evt.HasAttribute("xml:lang")) { if (RdfSpecsHelper.IsValidLangSpecifier(evt["xml:lang"])) { context.Language = evt["xml:lang"]; } } else if (evt.HasAttribute("lang")) { if (RdfSpecsHelper.IsValidLangSpecifier(evt["lang"])) { context.Language = evt["lang"]; } } }
public override void ParseLiteralLanguage(RdfACoreParserContext context, IRdfAEvent evt) { if (evt.HasAttribute("xml:lang")) { if (RdfSpecsHelper.IsValidLangSpecifier(evt["xml:lang"])) { context.Language = evt["xml:lang"]; } } }
public override void ParseExtensions(RdfACoreParserContext context, IRdfAEvent evt) { if (evt.HasAttribute("xml:base")) { try { context.BaseUri = new Uri(Tools.ResolveUri(evt["xml:base"], context.BaseUri.ToSafeString())); } catch { // If URI resolution fails then cannot change the Base URI } } }
private INode ParseRelOrRevSubject(RdfACoreParserContext context, IRdfAEvent evt, bool isRoot) { if (evt.HasAttribute("about")) { return(this.ParseAboutAttribute(context, evt)); } else if (evt.HasAttribute("src")) { return(this.ParseSrcAttribute(context, evt)); } else if (isRoot || context.HostLanguage.IsRootElement(evt)) { return(this.UriToNode(context, this.ParseUri(context, String.Empty, RdfACurieMode.SafeCurieOrCurieOrUri))); } else if (evt.HasAttribute("typeof")) { return(context.Handler.CreateBlankNode()); } else { return(context.ParentObject); } }
public override void ParseExtensions(RdfACoreParserContext context, IRdfAEvent evt) { if (evt.HasAttribute("xml:base")) { try { context.BaseUri = new Uri(Tools.ResolveUri(evt["xml:base"], context.BaseUri.ToSafeString())); } catch { //If URI resolution fails then cannot change the Base URI } } }
private INode ParseSubject(RdfACoreParserContext context, IRdfAEvent evt, bool isRoot, out bool skip) { skip = false; if (evt.HasAttribute("about")) { return(this.ParseAboutAttribute(context, evt)); } else if (evt.HasAttribute("src")) { return(this.ParseSrcAttribute(context, evt)); } else if (evt.HasAttribute("resource")) { return(this.ParseResourceAttibute(context, evt)); } else if (evt.HasAttribute("href")) { return(this.ParseHrefAttribute(context, evt)); } else if (isRoot || context.HostLanguage.IsRootElement(evt)) { return(this.UriToNode(context, this.ParseUri(context, String.Empty, RdfACurieMode.SafeCurieOrCurieOrUri))); } else if (evt.HasAttribute("typeof")) { return(context.Handler.CreateBlankNode()); } else { if (evt.HasAttribute("property")) { skip = true; } return(context.ParentObject); } }
private INode ParseObjectResource(RdfACoreParserContext context, IRdfAEvent evt) { if (evt.HasAttribute("resource")) { return this.ParseResourceAttibute(context, evt); } else if (evt.HasAttribute("href")) { return this.ParseHrefAttribute(context, evt); } else { return null; } }
private INode ParseRelOrRevSubject(RdfACoreParserContext context, IRdfAEvent evt, bool isRoot) { if (evt.HasAttribute("about")) { return this.ParseAboutAttribute(context, evt); } else if (evt.HasAttribute("src")) { return this.ParseSrcAttribute(context, evt); } else if (isRoot || context.HostLanguage.IsRootElement(evt)) { return this.UriToNode(context, this.ParseUri(context, String.Empty, RdfACurieMode.SafeCurieOrCurieOrUri)); } else if (evt.HasAttribute("typeof")) { return context.Handler.CreateBlankNode(); } else { return context.ParentObject; } }
private INode ParseSubject(RdfACoreParserContext context, IRdfAEvent evt, bool isRoot, out bool skip) { skip = false; if (evt.HasAttribute("about")) { return this.ParseAboutAttribute(context, evt); } else if (evt.HasAttribute("src")) { return this.ParseSrcAttribute(context, evt); } else if (evt.HasAttribute("resource")) { return this.ParseResourceAttibute(context, evt); } else if (evt.HasAttribute("href")) { return this.ParseHrefAttribute(context, evt); } else if (isRoot || context.HostLanguage.IsRootElement(evt)) { return this.UriToNode(context, this.ParseUri(context, String.Empty, RdfACurieMode.SafeCurieOrCurieOrUri)); } else if (evt.HasAttribute("typeof")) { return context.Handler.CreateBlankNode(); } else { if (evt.HasAttribute("property")) skip = true; return context.ParentObject; } }