feat(电子公文): 完善标引注释,优化资源处理
build.yaml / build (push) Successful in 48s

This commit is contained in:
xiaoqidun committed 2026-10-13 08:30:03 +08:00
1 parent 3f797e656b
commit 91e5b57e24
43 files changed
+2018 -384

No files matched your search

+4 -1
View File
@@ -42,8 +42,11 @@ func encodeStructureNode(node StructureNode) ([]byte, error) {
return err
}
start := xml.StartElement{Name: xml.Name{Space: node.Namespace, Local: node.Name}}
if node.Namespace == "" {
switch node.Namespace {
case "":
start.Attr = append(start.Attr, xml.Attr{Name: xml.Name{Local: "xmlns"}, Value: ""})
case "http://www.w3.org/XML/1998/namespace":
start.Name = xml.Name{Local: "xml:" + node.Name}
}
for _, attr := range node.Attributes {
start.Attr = append(start.Attr, xml.Attr{Name: xml.Name{Space: attr.Namespace, Local: attr.Name}, Value: attr.Value})