Open PiperBaron opened 3 years ago
@PiperBaron I see it, I think: You want the @ref
attributes on this file https://github.com/PiperBaron/KPopRepo/blob/master/markedup_songs/song_markup_sample.xml to be checked by the @xml:id
attributes defined here: https://github.com/PiperBaron/KPopRepo/blob/master/group_profiles/group_markup_sample.xml .
I'll give this a go with Schematron, and push something up shortly! I'll try and explain how it works, too in case you want to develop it a little. It will make more sense when we get to XPath.
@PiperBaron @AreannaRussell Can you tell me which elements in the group_markup_sample.xml file are meant to match up with these attributes?
@artistRef
(Does this point to any @xml:id
on a <member>
element?)
@labelRef
(Does this point to any @xml:id
on an <album>
? or a <company
element? Or both?)
@ref
(I'm not sure: does this resolve like @artistRef
to <member>
, or point to any @xml:id
(doesn't matter what element it's on)?
@ebeshero Sorry if it's kind of confusing! Please let me know if I'm not using the @xml:id
and references incorrectly.
@artistRef
can be used pretty freely -- it's used to point to any artist, be it a whole group or an individual member, and mostly utilized in the information/about section.@ref
is meant to point to the @xml:id
on the <stageName>
element within the <member>
element (is there some way I should clarify this in the schema?). @ref
is used specifically for the lines of each song, and now I'm thinking I should probably adjust it and change it to something like @lineRef
for clarity. @xml:id
on the <company>
element. Albums have their own reference @albumRef
.@PiperBaron Thanks—that helps! You’re coding this correctly—I just couldn’t tell exactly what the relationships were at first. The Schematron file will help clarify these connections and become part of the project documentation too. I’ll write it in the morning and we can see if it works correctly.
@PiperBaron @AreannaRussell With this commit, https://github.com/PiperBaron/KPopRepo/commit/a3644fcfe57c6afdb4aef7d7b02afc83a76e2948 , I have prepped a Schematron file that can check your @artistRef
, @labelRef
, and @ref
attributes against values in the group document. I didn't see any @xml:id
values defined on <stageName>
elements, so I wasn't sure what to do there. I made that last rule for @ref
basically say,
Values must either be "All," or from an @xml:id
on <stageName>
, or an @xml:id
on <member>
elements that don't have xml:ids on their <stageName>
elements inside. Currently we can only have xml:id
s member elements, so that's what is validating your @ref
ids at the moment. You may want to change this part? Let's talk more--maybe I can join your next meeting to go over this.
@PiperBaron @AreannaRussell When you do a git pull
, notice there's a new schema association line on your song XML file, and I changed the IDREF datatype on those attributes over to just plain text in your song RNC file. I replaced it with the reserve word text
just to stop the RNC file from being stymied about not finding xsdID
values to validate inside the file, since we now have Schematron checking these.
@ebeshero I replied on Slack, but I'll reply here too. Thank you for the help! I realized what I did with the
I'll push the edited xmlidChecker file (I have the original save in case I mess it up somehow) with some more song/group documents to make sure it all works.
@ebeshero @AreannaRussell
Here we can discuss how to reference the xml:id from one document on another. I've uploaded sample documents and their schemas to start!