diff --git a/jdr/sheet.go b/jdr/sheet.go index bc14005..aad44ef 100644 --- a/jdr/sheet.go +++ b/jdr/sheet.go @@ -16,6 +16,7 @@ type SheetItem interface{ } type Block struct { + Name string Items []SheetItem } @@ -105,6 +106,16 @@ func parseVariable(root xmlNode, sheet *CharacterSheet) (*Variable, error) { func parseBlock(root xmlNode, sheet *CharacterSheet) (*Block, error) { ret := &Block{} + for i := 0; i < len(root.Attrs); i++ { + attrName := root.Attrs[i].Name.Local + attrVal := root.Attrs[i].Value + + switch attrName { + case "name": + ret.Name = attrVal + } + } + for i := 0; i < len(root.Nodes); i++ { item, err := parseItem(root.Nodes[i], sheet) if err != nil {