update
This commit is contained in:
parent
4233a10f04
commit
c423acfb43
|
@ -5,7 +5,7 @@ open System.Xml
|
|||
open System
|
||||
/// 展现节点 =========================================================================================
|
||||
module Present =
|
||||
/// 可访问元素
|
||||
/// 可访问页面
|
||||
type PageAccess(hrefs: string) =
|
||||
class
|
||||
member this.accessLink(): string = hrefs
|
||||
|
@ -59,7 +59,7 @@ open System
|
|||
member this.object() =
|
||||
volume.object()
|
||||
member this.getHtmlWith(p: XmlElement): XmlElement =
|
||||
raise (System.NotImplementedException())
|
||||
failwith "getHtmlWith"
|
||||
|
||||
interface IContainer with
|
||||
member this.children(): IDomUnit list = childs
|
||||
|
@ -77,7 +77,7 @@ open System
|
|||
member this.object() =
|
||||
story.object()
|
||||
member this.getHtmlWith(p: XmlElement): XmlElement =
|
||||
raise (System.NotImplementedException())
|
||||
failwith "getHtmlWith"
|
||||
|
||||
interface IContainer with
|
||||
member this.children(): IDomUnit list = childs
|
||||
|
@ -94,7 +94,7 @@ open System
|
|||
member this.name():string = point.name()
|
||||
member this.object() = point.object()
|
||||
member this.getHtmlWith(p: XmlElement): XmlElement =
|
||||
raise (System.NotImplementedException())
|
||||
failwith "getHtmlWith"
|
||||
|
||||
interface IContainer with
|
||||
member this.children(): IDomUnit list = refer_list
|
||||
|
@ -111,7 +111,7 @@ open System
|
|||
member this.name(): string = ""
|
||||
member this.object() = word
|
||||
member this.getHtmlWith(pnode: XmlElement): XmlElement =
|
||||
raise (System.NotImplementedException())
|
||||
failwith "getHtmlWith"
|
||||
end
|
||||
|
||||
|
||||
|
@ -126,12 +126,12 @@ open System
|
|||
member this.name(): string = ref_signature
|
||||
member this.object() = refs
|
||||
member this.getHtmlWith(pnode: XmlElement): XmlElement =
|
||||
raise (System.NotImplementedException())
|
||||
failwith "getHtmlWith"
|
||||
|
||||
interface Present.IContainer with
|
||||
member this.children(): Present.IDomUnit list = items
|
||||
member this.append(childs: Present.IDomUnit list): Present.IContainer =
|
||||
raise (System.NotImplementedException())
|
||||
failwith "append"
|
||||
end
|
||||
let refer_assemble (refn: AstImport.PointRef) : PointRefer =
|
||||
let texts = refn.children() |> List.map (fun dom -> TextContent(dom) :> Present.IDomUnit)
|
||||
|
@ -148,12 +148,12 @@ open System
|
|||
member this.name(): string = defs.name()
|
||||
member this.object() = defs
|
||||
member this.getHtmlWith(pnode: XmlElement): XmlElement =
|
||||
raise (System.NotImplementedException())
|
||||
failwith "getHtmlWith"
|
||||
|
||||
interface Present.IContainer with
|
||||
member this.children(): Present.IDomUnit list = items
|
||||
member this.append(childs: Present.IDomUnit list): Present.IContainer =
|
||||
raise (System.NotImplementedException())
|
||||
failwith "append"
|
||||
end
|
||||
let point_assemble (defs: AstImport.PointDef) : PointDefine =
|
||||
let texts = defs.children() |> List.map (fun dom -> TextContent(dom) :> Present.IDomUnit)
|
||||
|
@ -169,12 +169,12 @@ open System
|
|||
member this.name() = from
|
||||
member this.object() = item.object()
|
||||
member this.getHtmlWith(pnode: XmlElement): XmlElement =
|
||||
raise (System.NotImplementedException())
|
||||
failwith "getHtmlWith"
|
||||
|
||||
interface Present.IContainer with
|
||||
member this.children(): Present.IDomUnit list = item.children()
|
||||
member this.append(childs: Present.IDomUnit list): Present.IContainer =
|
||||
raise (System.NotImplementedException())
|
||||
failwith "append"
|
||||
end
|
||||
|
||||
|
||||
|
@ -184,12 +184,12 @@ open System
|
|||
member this.name(): string = defs.name()
|
||||
member this.object() = defs
|
||||
member this.getHtmlWith(pnode: XmlElement): XmlElement =
|
||||
raise (System.NotImplementedException())
|
||||
failwith "getHtmlWith"
|
||||
|
||||
interface Present.IContainer with
|
||||
member this.children(): Present.IDomUnit list = items
|
||||
member this.append(childs: Present.IDomUnit list): Present.IContainer =
|
||||
raise (System.NotImplementedException())
|
||||
failwith "append"
|
||||
end
|
||||
let slice_assemble (defs: AstImport.SliceDef) : SliceDefine =
|
||||
let childs = defs.children()
|
||||
|
@ -198,7 +198,7 @@ open System
|
|||
| :? AstImport.PointRef as refs -> refer_assemble(refs)
|
||||
| :? AstImport.PointDef as defs -> point_assemble(defs)
|
||||
| :? AstImport.TextItem as text -> TextContent(text)
|
||||
| _ -> raise (System.NotImplementedException())
|
||||
| _ -> failwith "match error"
|
||||
)
|
||||
SliceDefine(defs, childs)
|
||||
|
||||
|
@ -210,12 +210,12 @@ open System
|
|||
defs.name()
|
||||
member this.object() = defs
|
||||
member this.getHtmlWith(pnode: XmlElement): XmlElement =
|
||||
raise (System.NotImplementedException())
|
||||
failwith "getHtmlWith"
|
||||
|
||||
interface Present.IContainer with
|
||||
member this.children(): Present.IDomUnit list = childs
|
||||
member this.append(childs: Present.IDomUnit list): Present.IContainer =
|
||||
raise (System.NotImplementedException())
|
||||
failwith "append"
|
||||
end
|
||||
let story_assemble (defs: AstImport.StoryDef): StoryDefine =
|
||||
let childs = defs.children()
|
||||
|
@ -223,7 +223,7 @@ open System
|
|||
match data with
|
||||
| :? AstImport.SliceDef as defs -> slice_assemble(defs)
|
||||
| :? AstImport.TextItem as text -> TextContent(text)
|
||||
| _ -> raise (System.NotImplementedException())
|
||||
| _ -> failwith "match error"
|
||||
)
|
||||
StoryDefine(defs, childs)
|
||||
|
||||
|
@ -235,12 +235,12 @@ open System
|
|||
defs.name()
|
||||
member this.object() = defs
|
||||
member this.getHtmlWith(pnode: XmlElement): XmlElement =
|
||||
raise (System.NotImplementedException())
|
||||
failwith "getHtmlWith"
|
||||
|
||||
interface Present.IContainer with
|
||||
member this.children(): Present.IDomUnit list = childs
|
||||
member this.append(childs: Present.IDomUnit list): Present.IContainer =
|
||||
raise (System.NotImplementedException())
|
||||
failwith "append"
|
||||
end
|
||||
let article_assemble (defs: AstImport.ArticleDef) : ArticleDefine =
|
||||
let childs = defs.children()
|
||||
|
@ -248,7 +248,7 @@ open System
|
|||
match data with
|
||||
| :? AstImport.TextItem as text -> TextContent(text)
|
||||
| :? AstImport.PointRef as refs -> refer_assemble(refs)
|
||||
| _ -> raise (System.NotImplementedException())
|
||||
| _ -> failwith "match error"
|
||||
)
|
||||
ArticleDefine(defs, childs)
|
||||
|
||||
|
@ -260,7 +260,7 @@ open System
|
|||
defs.name()
|
||||
member this.object() = defs
|
||||
member this.getHtmlWith(pnode: XmlElement): XmlElement =
|
||||
raise (System.NotImplementedException())
|
||||
failwith "getHtmlWith"
|
||||
|
||||
interface Present.IContainer with
|
||||
member this.children(): Present.IDomUnit list = childs
|
||||
|
@ -273,7 +273,7 @@ open System
|
|||
match data with
|
||||
| :? AstImport.TextItem as text -> TextContent(text)
|
||||
| :? AstImport.ArticleDef as defs -> article_assemble(defs)
|
||||
| _ -> raise (System.NotImplementedException())
|
||||
| _ -> failwith "match error"
|
||||
)
|
||||
VolumeDefine(defs, childs)
|
||||
|
||||
|
@ -307,7 +307,7 @@ open System
|
|||
| :? AstImport.VolumeDef as defs ->
|
||||
(refs_depth, VolumeDefine(defs, childs))::result_nodes
|
||||
| :? AstImport.Program -> result_nodes
|
||||
| _ -> raise (System.NotImplementedException())
|
||||
| _ -> failwith "match error"
|
||||
|
||||
result_nodes <- datas
|
||||
if refs_depth > 0 then
|
||||
|
|
Loading…
Reference in New Issue