Search found 25 matches

by david_himself
Fri Oct 16, 2020 4:10 pm
Forum: XML Schemas
Topic: Multiple values in target
Replies: 7
Views: 791

Re: Multiple values in target

It's OK! Got it working as a standalone file. I am really grateful for your patience and help.

best
David
by david_himself
Fri Oct 16, 2020 3:17 pm
Forum: XML Schemas
Topic: Multiple values in target
Replies: 7
Views: 791

Re: Multiple values in target

Dear Octavian, Thanks once again. I'm currently using a very long schema ODD and a short standalone Schematron file. I'm embarrassed to say that in my ignorance I haven't managed either to embed your new Schematron fragment in my ODD or to use it as a standalone file. I don't want to post a very lon...
by david_himself
Thu Oct 15, 2020 5:22 pm
Forum: XML Schemas
Topic: Multiple values in target
Replies: 7
Views: 791

Re: Multiple values in target

Still a problem. The assertion you suggested works fine for persName/@ref or rs/@ref with a single value, but with multiple space-delimited values, it only fires if ALL are missing from the personography -- that is, the assertion is satisfied if ANY ONE of the values matches an xml:id. I suspect it'...
by david_himself
Thu Oct 15, 2020 3:02 pm
Forum: XML Schemas
Topic: Multiple values in target
Replies: 7
Views: 791

Re: Multiple values in target

Thanks so much, Octavian. All my attempts to use a let statement and the tokenize fn had either not validated in the ODD or had thrown an error at a later stage. This solves my immediate problem, and the technique will be useful elsewhere too.
David
by david_himself
Thu Oct 15, 2020 11:23 am
Forum: XML Schemas
Topic: Multiple values in target
Replies: 7
Views: 791

Multiple values in target

I want Schematron to check that a target in a TEI/XML file corresponds to an xml:id in another file. My (possibly clumsy) report uses test="not(document('../personography/HAMpersons.xml')//tei:TEI//tei:person/[@xml:id] = substring-after(./@ref,'#'))" This works fine for the majority of cases, but ob...
by david_himself
Wed Sep 30, 2020 8:19 am
Forum: XML Schemas
Topic: Schematron and tokenize
Replies: 4
Views: 397

Re: Schematron and tokenize

Perfect! Thank you.

D
by david_himself
Wed Sep 30, 2020 7:29 am
Forum: XML Schemas
Topic: Schematron and tokenize
Replies: 4
Views: 397

Re: Schematron and tokenize

Thanks, Radu. I thought I'd tested with a non-regex string to eliminate the possibility of regex being the cause of failure, but perhaps I did that too hastily. I also tried fn:matches, but it cannot take a sequence as first argument. Is there a simple way of testing that all space-delimited values ...
by david_himself
Tue Sep 29, 2020 11:11 pm
Forum: XML Schemas
Topic: Schematron and tokenize
Replies: 4
Views: 397

Schematron and tokenize

Hi I'm embedding Schematron rules in a schema for validating a TEI/XML personography. I have eight reports that constrain the attributes and values in the context of <relation>. Seven fire correctly and one never fires. For some rules I'm tokenizing the value of @mutual and looking at the individual...
by david_himself
Mon Apr 27, 2020 4:51 pm
Forum: XML Schemas
Topic: locating a string with text() in Schematron
Replies: 3
Views: 671

Re: locating a string with text() in Schematron

Hi Octavian. Many thanks for your answer. As you suggest, highlighting the beginning of the line isn't perfect, but it would be good enough for now. I've moved several errors and warnings for particular text strings from the <text> context to <lb>. The (relatively unimportant) warning about straight...
by david_himself
Sat Apr 25, 2020 12:44 pm
Forum: XML Schemas
Topic: locating a string with text() in Schematron
Replies: 3
Views: 671

Re: locating a string with text() in Schematron

Just realised (Duh!) that I might be able to use the <lb/> at the start of every line. Should make the problem more tractable. Will try again with that in mind, and if that does it, apologies for having troubled you.
David
by david_himself
Fri Apr 24, 2020 5:39 pm
Forum: XML Schemas
Topic: locating a string with text() in Schematron
Replies: 3
Views: 671

locating a string with text() in Schematron

In my ODD file (for Relax NG XML) I want a Schematron test to identify straight quotes in text in mixed content files. I've tried this: <elementSpec ident="text" module="textstructure" mode="change"> <!-- Reminder about curly quotes in text --> <constraintSpec ident="quotes" scheme="schematron"> <co...
by david_himself
Wed Apr 08, 2020 1:06 pm
Forum: XML Schemas
Topic: Schematron and Oxygen 22.0
Replies: 2
Views: 424

Re: Schematron and Oxygen 22.0

Thanks, Radu. Unchecking that option fixed the problem for my colleague. I don't think the rest of us had it checked. I'm going to get rid of most or all default choices in the schema anyway, as they don't really help.

best
David
by david_himself
Tue Apr 07, 2020 4:13 pm
Forum: XML Schemas
Topic: Schematron and Oxygen 22.0
Replies: 2
Views: 424

Schematron and Oxygen 22.0

Hi I've just started with ODD containing some elementary Schematron, generating a Relax NG XML file for validation of our TEI/XML files. For four members of our team the schema seems to work fine, but for one colleague, two rules in particular fire wrongly or fail to fire. We haven't spotted any dif...
by david_himself
Mon Mar 30, 2020 10:41 am
Forum: XML Schemas
Topic: Content completion not working with IDs
Replies: 2
Views: 515

Re: Content completion not working with IDs

I now suspect an XPR file, as removing that from my XMLs folder solved the immediate problem. I wasn't sure which line(s) in the XPR had blocked that kind of content completion, so clues would still be welcome. Thanks.
by david_himself
Sun Mar 29, 2020 6:31 pm
Forum: XML Schemas
Topic: Content completion not working with IDs
Replies: 2
Views: 515

Content completion not working with IDs

Hi. I have oXygen 21.1. When editing a TEI/XML file, content completion works fine for almost everything specified in our Relax NG schema when schema is associated with the file, except that when inserting a <note>, the attribute @hand does not prompt me for available xml:ids declared in the header....
by david_himself
Mon May 13, 2019 7:59 pm
Forum: XSLT and FOP
Topic: Avoid preview in ODD by example
Replies: 2
Views: 792

Re: Avoid preview in ODD by example

Thanks, Radu. I might try TEI-L at some point for questions specific to that transformation. I got it to run by setting the corpus parameter to ${pdu}. As for the unwanted HTMLs, I'd already tried unchecking the "Open->In System Application' checkbox, but it hadn't helped. Today I figured out that t...
by david_himself
Thu May 09, 2019 8:33 pm
Forum: XSLT and FOP
Topic: Avoid preview in ODD by example
Replies: 2
Views: 792

Avoid preview in ODD by example

I'm trying to run oddByExample.xsl over a folder of some 400 TEI/XML files, following Lou Burnard's instructions at http://teic.github.io/TCW/howtoGenerate.html. If I follow Lou's instructions to the letter, I get an error: "Exception thrown by URIResolver: Malformed URL ...". This is from running t...
by david_himself
Wed Apr 24, 2019 1:03 pm
Forum: Common Problems
Topic: Confine pretty-printing to teiHeader
Replies: 5
Views: 986

Re: Confine pretty-printing to teiHeader

Thank you for quick responses. Should be OK now, touch wood.

D
by david_himself
Wed Apr 24, 2019 10:41 am
Forum: Common Problems
Topic: Confine pretty-printing to teiHeader
Replies: 5
Views: 986

Re: Confine pretty-printing to teiHeader

PS. Or globally edit the text element in each XML to add the attribute xml:space="preserve" (and adjust schema accordingly), then allow the original XSLT to run with indent="yes". That looks a (deceptively?) simple fix. Is there a catch?

David
by david_himself
Wed Apr 24, 2019 9:48 am
Forum: Common Problems
Topic: Confine pretty-printing to teiHeader
Replies: 5
Views: 986

Re: Confine pretty-printing to teiHeader

Thanks, Radu. I've found this useful discussion: http://tei-l.970651.n3.nabble.com/oXygen-and-the-quot-Format-and-Indent-quot-function-td2346233.html I'm currently thinking of doing the following. (1) Reverting my XMLs to the latest version before the XSLT edit which included indent="yes". (2) Remov...
by david_himself
Wed Apr 24, 2019 1:53 am
Forum: Common Problems
Topic: Confine pretty-printing to teiHeader
Replies: 5
Views: 986

Confine pretty-printing to teiHeader

Hi I wrote an XSLT to edit a folder of 400+ XML documents. It was meant to adjust many elements inside teiHeader/fileDesc without changing anything substantive in the rest of the teiHeader or in the text portion. When I added indent="yes" to the XSLT, it pretty-printed the whole header of the XMLs, ...
by david_himself
Thu Feb 14, 2019 11:13 pm
Forum: Common Problems
Topic: namespace conflict
Replies: 3
Views: 887

Re: namespace conflict

Many thanks for quick reply. My preferred solution, given that the website has server-side processing, is for a suitable XSLT 2.0 processor to be used. Is there any merit in XSLT 1.0 solutions which create a new root element and a set of new elements which copy the existing elements but give them th...
by david_himself
Thu Feb 14, 2019 11:50 am
Forum: Common Problems
Topic: namespace conflict
Replies: 3
Views: 887

namespace conflict

Beginner's confusion about the namespace of an XML and perhaps of an XSLT. This post overlaps with several previous posts, but I couldn't be sure I'd found the appropriate fix in them. Apologies if already answered. I have a set of XML files which reference an XSLT file and a Relax NG schema, as fol...
by david_himself
Tue Oct 02, 2018 10:54 am
Forum: XSLT and FOP
Topic: Awkward XPath reference
Replies: 2
Views: 1223

Re: Awkward XPath reference

Works a treat. Thank you.

D
by david_himself
Mon Oct 01, 2018 7:53 pm
Forum: XSLT and FOP
Topic: Awkward XPath reference
Replies: 2
Views: 1223

Awkward XPath reference

We have started marking precision on some XML date elements. An invented maximal example is as follows: <date when="1815-01-06" notBefore="1814-10" notAfter="1815">6 January c1815 <precision match="@when" precision="medium"/> <precision match="@notBefore" precision="high"/> <precision match="@notAft...