我正在尝试为以下xml添加dtd,但我得到Open quote is expected for attribute "play" associated with an element type "movie"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE table [
<!ATTLIST movie play (yes | No ) >
]>
<table>
<movie play="yes">
</movie>
</table>
答案 0 :(得分:1)
默认值是必需的,如:
def breadth_first_search(adj_matrix, source_index, end_index)
node_queue = [source_index]
puts "#{source_index} stored into queue \n"
loop do
curr_node = node_queue.pop
puts "#{curr_node} popped \n"
return false if curr_node == nil
return true if curr_node == end_index
children = (0..adj_matrix.length-1).to_a.select do |i|
adj_matrix[curr_node][i] == 1
end
puts "children: #{children}"
node_queue = children + node_queue
puts "node_queue: #{node_queue}"
end
end
错误信息可能更好: - )