Could not load document /LoW.xml. Maybe it is not valid TEI or not in the TEI namespace? - exist-db

I am sure this is quite basic, but I'm putting together a traning-database with some files on the loss of a particular ship.
When uploading it to exist-db (I created the DB with tei-publisher ...) and wanting to present the file, I get the above error.
I am quite sure that my file is okay, however, I am quite irritated.
Please find the tei-code in the following paste.
https://pastebin.com/0H3jCfe8
the header is in code, as required (and irritating)
<teiHeader>
<fileDesc>
<titleStmt>
<title>TITLE</title>
</titleStmt>
<editionStmt/>
<extent/>
<publicationStmt/>
<seriesStmt/>
<notesStmt/>
<sourceDesc>Description</sourceDesc>
</fileDesc>
<revisionDesc/>
</teiHeader>
OxygenXML claims IllegalStateException but I cannot find the error....

Related

Should Normalize.css be kept as separate file or compiled (through postcss #import) into the final "styles.css" file?

In terms of performance/speed of the final product and according to the best practices - should Normalize.css be kept as separate file (linked from HTML head) or is it better to compile it into the final .css file?
I was searching here and on many other websites but couldn't find an answer. Hopefully, you'll understand my dilemma with this:
1. Leave normalize.css in node-modules folder and link to it from our html.
I'm still fresh into coding, but if I understand correctly with this approach we will add one more (maybe unnecessary?) request to the server in addition to our main.css file? How bad is it or how taxing is it on performance/loading time of website?
<link rel="stylesheet" href="../node_modules/normalize.css/normalize.css">
<link rel="stylesheet" href="temp/styles/styles.css">
On the other hand, we can:
2. use 'postcss-import' to import normalize.css with the other modules and compile them all together into one final .css file.
Ok, now we have everything in one place, but we have just added 451 lines of code (and comments) before the first line our our actual css. In terms of readability it doesn't seem like the best solution to me, but is website going to load a bit faster now?
Disclaimer: I've been using the second approach so far, but I started asking myself if that is the optimal solution.
Thank you in advance.
You are quite correct in stating that a web page will load faster if it makes fewer requests to the server when loading. You are also correct in stating that the combined file is less readable than the individual files loaded separately.
Which is more important to you in your situation is a question only you can answer. That is why you are having a hard time finding definitive advice.
Personally I use the separate file option in development so that the files are easy to read and debug. Speed of loading isn't as important on a development machine.
In production websites I use the combined file option. In fact, I use combine and minify to reduce the number of files loaded and keep the size of those files as small as possible. Readability is less important in this situation.
Ideally adding normalize.css to your final css would be done in a post processing step that combines all of your source files into one file and minifies the whole thing. That way your source is still readable but you end up only loading one file.

Flat file data validation

I am supposed to load some data that is received in flat files (csv). The problem is that the supplier is generating a lot of junk data.
before starting to develop anything new on my own, I would like to ask if there is something that could automate this process.
I have found an open source tool called flat file checker, It can accept a bunch of various validation rules including regex, but the problem is that it does not work. It is exactly what I need, but it is not validating.
Does anyone have any suggestion for something like this, but actually works

How to make Compass/Sass compilation command generate parsable output

I’d like to automate the compilation of Compass projects and be able to get output that I can parse so I can take only what I need (the errors) and further format them how I want.
The issue is that Compass output is not in a format that can be easily parsed (it has error messages on multiple lines).
Is there any reliable way to parse this output? Or… any idea what would need to be changed and where in Compass’s code to allow a new param that would allow you to specify the output format (e.g. JSON, XML)?
I’m asking this because I don’t know Ruby, so I would need a starting point. Their current code is not easy to understand (due to the fact that I don’t know Ruby), but if I at least have a starting point I would try to see what I can do and hopefully create a pull request with this if I get it working.
I think, there is another way to solve this problem, what you think about to parse the output css and do not touch compass.
There is a good framework for creating postproccesor for css:
https://github.com/postcss/postcss
You can do what you want with output css and send message to console or send email or other things, and many other things.

Magento code changes in local don't work

I'm trying to fix the Magento search issue where 'OR' is used for comparison of multiple search terms instead of 'AND'.
I've seen quite a number of suggestions on the web regarding how to fix this, and the general idea is as follows:
Copy
app/code/core/Mage/CatalogSearch/Model/resource/Fulltext.php to
app/code/local/Mage/CatalogSearch/Model/resource/Fulltext.php and in the copy, change the instances of 'OR' to 'AND', where the SQL queries are built.
However, my changes don't seem to work as expected and what is even more confusing is that the prepareResult() method (which is where the SQL changes above are made) doesn't even seem to run at all when searches are done. I've tested this by putting some debugging code in the function.
I've used the same debug code to verify that the file gets loaded. But the debug code doesn't run when inserted at the prepareResult() function. (The debug code basically writes to a file on disk).
What am I missing here?
Kindly note that this is not so much about the right way to accomplish the end goal of fixing Magento search. I'm aware it's best done via an extension. I'd just like to figure out why prepareResult() isn't being called as expected.

Rainmeter: How to concatenate strings

I am getting data from a broken RSS feed that gives me wrong link. I wanted to fix this link so I made this code:
<link.*>(.*)&.*tid(.*)</link>
and the link could be like:
www.somedomain.com/?value=50&burrrdurrrr;tid=120
But the real working link is in this form:
www.somedomain.com/?value=50&tid=120
The thing that I'm asking is if my measure thing looks like this:
[FeedURL]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=2 ;now I only get www.somedomain.com/?value=50
Substitute=#SubstituteFeed#
How am I supposed to concatenate the strings together to complete the url?
I'm guessing rather than &burrrdurrrr;, the link has &, which is how you have to write & in an HTML or XML file.
If that's the case, you just need to set the DecodeCharacterReference option, as described in this handy-looking tutorial. Another option mentioned there is Substitute, which would be able to strip it out even if it really was &burrrdurrrr;.
None of this is a particularly sensible way of dealing with HTML or XML - a much better approach would be a plugin which actually parsed the document structure and let you reference nodes using XPath or CSS rules - but you work with what you've got, I guess. (I've never heard of this "Rainmeter" before, despite its claim to be "the best known and most popular desktop customization program for Windows"; maybe because nobody else calls their program that, instead almost universally using the word "widget"?)

Resources