using a schema with import fails inside devtools::test
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- r
- Ambito
- testing-qa
Direzione di ricerca
Start with the reproduction package at github.com/shug0131/eudraCT/tree/master/R/eudract and compare validation under devtools::test() with validation after devtools::load_all(). Check how the schema import in inst/extdata/RRSUploadSchema.xsd is resolved in each context. Done means the imported schema is found and validation succeeds when run through devtools::test().
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I have a function in a package I'm building that calls xml2::validate(). This works ok called from console.
But inside devtools::test , it comes back with errors starting
Element '{http://www.w3.org/2001/XMLSchema}import': Failed to locate a schema at location '/me-filer1/groups3$/CCTU/STATISTICS/NON%20STUDY%20FOLDER/Academic%20Research/Eudract%20Tool/R/eudract/inst/extdata/RRSUploadSchema.xsd'. Skipping the import
I think the line in the schema itself is:
<xs:import
namespace="http://clinicaltrials.gov/rrs"
schemaLocation="RRSUploadSchema.xsd"
/>
which is available here (https://prsinfo.clinicaltrials.gov/RRSUploadSchema.xsd)
So it seems to trying to find the other file locally . Weirdly I do have a copy of the imported schema exactly where it is looking, but that doesn't help at all...
If I do devtools::load_all(), and run the line of code again in teh console rather than devtools::test(),. it works fine.
The full error message is:
Element '{http://www.w3.org/2001/XMLSchema}import': Failed to locate a schema at location '/me-filer1/groups3$/CCTU/STATISTICS/NON%20STUDY%20FOLDER/Academic%20Research/Eudract%20Tool/R/eudract/inst/extdata/RRSUploadSchema.xsd'. Skipping the import.Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'ref': The QName value '{http://clinicaltrials.gov/rrs}result' does not resolve to a(n) element declaration.Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'ref': The QName value '{http://clinicaltrials.gov/rrs}resultDisposition' does not resolve to a(n) element declaration.Element '{http://clinicaltrials.gov/prs}study_collection': No matching global declaration available for the validation root.
In addition: Warning message:
In xml_validate.xml_document(original, schema_output) :
failed to load external entity "/me-filer1/groups3$/CCTU/STATISTICS/NON%20STUDY%20FOLDER/Academic%20Research/Eudract%20Tool/R/eudract/inst/extdata/RRSUploadSchema.xsd" [1549]
To reproduce see package at (https://github.com/shug0131/eudraCT/tree/master/R/eudract)
- Lingua principale
- R
- Stelle
- 227
- Fork
- 86
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di r-lib/xml2
-
Export libxml2_version()Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 67/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Optimize xml_path() and xml_find_all() for large node setsForse già presa @astruebi l’ha presa 182 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
Issue simili
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
Bioconductor/BiocParallel#289 ·
-
automation
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
waldronlab/BugSigDBcuration#2224 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
merliseclyde/BAS#118 ·