Assignment: write a RELAX NG schema for Keats _On first looking into
Chapman's Homer_.
I (deliberately) wrote a ridiculously literalist schema, attached.
When I create a new XML document that uses this schema, oXygen
properly inserts the required elements, including all 14 required
<pLine> elements. When I ask for auto-completion (CTL-space) of the
<head> or any of the @n, oXygen does the right thing and gives me
the one and only correct choice as the only possible value in the
pop-up.
But when I ask for auto-completion of <pLine>s 2 through 14, the one
and only possible value in the pop-up is the content for the first
<pLine>!
Worth noting that jing gets it right. After filling in the content
using auto-completion, validation will say of <pLine> 2, e.g.,
character content of element "pLine" invalid; must be equal to
"And many goodly states and kingdoms seen;"
Details:
<oXygen/> XML Developer 17.0, build 2015052917
Mac OS X 10.6.8
error occurs using XML syntax or compact syntax
Also tested on:
<oXygen/> XML Developer 17.0, build 2015051321
Ubuntu 12.04
only tested compact syntax
start =
element poem {
element head { "On first looking into Chapman's Homer" },
element sonnet {
element pLine {
attribute num { "01" },
"Much have I travell'd in the realms of gold,"
},
element pLine {
attribute num { "02" },
"And many goodly states and kingdoms seen;"
},
element pLine {
attribute num { "03" },
"Round many western islands have I been"
},
element pLine {
attribute num { "04" },
"Which bards in fealty to Apollo hold."
},
element pLine {
attribute num { "05" },
"Oft of one wide expanse had I been told"
},
element pLine {
attribute num { "06" },
"That deep-brow'd Homer rules as his demesne;"
},
element pLine {
attribute num { "07" },
"Yet did I never breathe its pure serene"
},
element pLine {
attribute num { "08" },
"Till I heard Chapman speak out loud and bold:"
},
element pLine {
attribute num { "09" },
"Then felt I like some watcher of the skies"
},
element pLine {
attribute num { "10" },
"When a new planet swims into his ken;"
},
element pLine {
attribute num { "11" },
"Or like stout Cortez when with eagle eyes"
},
element pLine {
attribute num { "12" },
"He star'd at the Pacific — and all his men"
},
element pLine {
attribute num { "13" },
"Look'd at each other with a wild surmise —"
},
element pLine {
attribute num { "14" },
"Silent, upon a peak in Darien."
}
}
}
--
Syd Bauman, EMT-Paramedic
Senior XML Programmer/Analyst
Northeastern University Women Writers Project
s.bauman(a)neu.edu or
Syd_Bauman(a)alumni.Brown.edu