XML: Milestones or Elements that cross other elements

自古美人都是妖i 提交于 2019-12-06 11:35:39

There's nothing illegal about this markup, at least as far as XML syntax is concerned.

It's a clever solution to the problem of having a string of text that must be broken up into segments in two overlapping schemes. You omitted the enclosing tags so it's impossible to intuit the hierarchical structure, but I will assume it's there and makes some attempt to organize things in a logical manner as a narrative. Then there's the need to indicate where the verse breaks are, and in general they can be totally arbitrary. They are really point-events in the flow (their term: milestones).

The only thing I'd disagree with is having 'start' and 'end' markers for verses. This introduces a potential for errors since the bracketing of start and end can't be validated within XML itself. I'd have used only 'start' markers. This assumes, of course, that the end of every verse corresponds to the start of another, or the end of a hierarchical section. I.e. it's not possible to have something 'between' two verses.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!