MKlamer / Motherhood-Journal

A Digital edition dissertation project
http://www.elizabethgaskelljournal.com
4 stars 0 forks source link

Oxygen no longer validating #11

Closed MKlamer closed 6 years ago

MKlamer commented 6 years ago

I'm not sure why, but Oxygen no longer is checking my coding. It could be because:

I have a line that is too long (per an error message; I'm not sure how to find which one.) I just upgraded to Oxygen 20.1 today. I'm not sure how to make sure my schema is associated. image

MKlamer commented 6 years ago

image

ebeshero commented 6 years ago

@MKlamer Long lines won't affect the schema validation, and there's really nothing to fear from them. (You can toggle the "line-wrap" in oXygen as you can in any text editor. Or you can just "pretty-print" the document, which will add lots of white space, but nothing you can't get rid of in processing with XSLT later.)

What will affect oXygen's ability to validate is if you have saved your XML file somewhere outside its normal location in your GitHub directory. I can't tell where you have saved your XML file, but my first guess is that perhaps you saved it to your Desktop, or perhaps elsewhere on a keychain drive?

If you are going to work on a different computer or a different location, you always need the entire GitHub repository as your XML file's "ecosystem". The XML file always needs to be saved in the same relative position to your schema file. Can you check and see where you've saved the file? Look at the filepath of your schema: The schema should be sitting like so:

Remember the process we went through for you to edit your project schema, and "run the wrench" in oXygen to generate a new schema? That positions the schema in the "out" directory. And you use Document --> Schema --> Associate Schema in oXygen to associate the file, but you shouldn't have to keep doing that so long as you are saving the XML file in the same place always in relation to the schema.

MKlamer commented 6 years ago

Elisa,

Thank you! I appreciate the feedback. I think I must have done something else wrong with my schema. It is saved in the correct directory. I have an ODD file within my Motherhood-Journal file, at the same level as my XML. Inside the ODD file is an "Out" folder with the schema in it. I tried creating a new ODD, and then generating a new schema from it and associating it again with my file, but I keep getting an error message as though it can't find the file.

I'll keep looking at it and trying other things.

image

MKlamer commented 6 years ago

Sometimes it won't even let me click on the button to re-associate the schema: image

I'll keep poking around and see if I'm missing a namespace line or something. Or perhaps I'm choosing the wrong type of schema. I've been selecting these. image

ebeshero commented 6 years ago

@MKlamer I'm doing a git pull on your repo to see if I can replicate the problem. From what I can see here, the problem may be to do with the filenames you have associated already. If you are going to newly associate a schema, try deleting the old schema lines before reassociating?

ebeshero commented 6 years ago

What I saw was that you were using a filename for the schema file on one Issue screenshot, and another name for the schema you wanted to associate. I'm confused about what you're trying to do here because the filenames should ideally stay the same...

ebeshero commented 6 years ago

@MKlamer AHA! I discovered the problem by pulling in your files that you'd pushed to the remote GitHub and looking at them locally. Here's what is wrong:

In your old schema association, it was indeed pointing to the wrong directory. Look at the file path:

<?xml-model href="../GitHub/Motherhood-Journal/ODD/out/Gaskell_ODD_draftA.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="../GitHub/Motherhood-Journal/ODD/out/Gaskell_ODD_draftA.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>

See how the schema lines are pointing first UP to a parent directory, and then DOWN into GitHub? That can't work when your XML file is already inside the GitHub/Motherhood-Journal directory!

When I delete those bad schema lines and re-associate your schema by browsing for it within the repo, the lines come out like this:


<?xml-model href="ODD/out/Gaskell_ODD_draftA.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="ODD/out/Gaskell_ODD_draftA.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>

See the difference? They now just go to ODD/out/Gaskell_ODD_draftA.rng

ebeshero commented 6 years ago

@MKlamer Once you make that schema association line stable, you shouldn't need to change it. I'm concerned about how your schema lines came to be changed to the wrong file path in the first place, and it looks to me as if you were almost certainly working on your TEI files outside their ordinary location in the GitHub repo--displaced. However that's happening, we need it not to happen in future--The GitHub repo is maintaining a sort of ecosystem for your project that is dependent on file path relationships remaining the same.

ebeshero commented 6 years ago

@MKlamer Your other settings that you showed me here (for how you're trying to associate the schema) are all correct. Just delete the old bad schema lines, and browse to find the file, but make sure your XML is inside your GitHub repo first. :-)

MKlamer commented 6 years ago

It's working! Thank you so much!

I think what happened is probably related to my getting a new computer in April or May. I may have accidentally shifted the directories around or messed them up when I was transferring files from my old computer. I probably moved the files by hand through explorer like the rest of my documents without realizing that for my oXygen files, I should have cloned from the online repo instead. I won't make that mistake again!

I really appreciate your taking the time to help. I'm at Camp Edit right now and enjoying learning a lot; I'm hoping to push forward into continuing to learn XSLT and filling out my prosopography in the next few weeks.

ebeshero commented 6 years ago

Whew! That's a relief--I'm glad you have it working and figured out what happened!

Enjoy Camp Edit! Elisa

On Wed, Jun 20, 2018 at 6:18 PM, Melissa notifications@github.com wrote:

It's working! Thank you so much!

I think what happened is probably related to my getting a new computer in April or May. I may have accidentally shifted the directories around or messed them up when I was transferring files from my old computer. I probably moved the files by hand through explorer like the rest of my documents without realizing that for my oXygen files, I should have cloned from the online repo instead. I won't make that mistake again!

I really appreciate your taking the time to help. I'm at Camp Edit right now and enjoying learning a lot; I'm hoping to push forward into continuing to learn XSLT and filling out my prosopography in the next few weeks.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MKlamer/Motherhood-Journal/issues/11#issuecomment-398915597, or mute the thread https://github.com/notifications/unsubscribe-auth/AD1BtseT6JLLUF-Nx0Ig9GLwqmXq_9awks5t-sosgaJpZM4UsIq6 .

-- Elisa Beshero-Bondar, PhD Director, Center for the Digital Text | Associate Professor of English University of Pittsburgh at Greensburg | Humanities Division 150 Finoli Drive Greensburg, PA 15601 USA E-mail: ebb8@pitt.edu ebb8@pitt.edu Development site: http://newtfire.org