After generation iXBRL in Fujitsu XWAND unknow namespace prefix appears - java

I'm working now on a XBRL software which uses Fujitsu XWAND for instance document generation and there are some unknown namespace prefix in file after generation.
<p:xbrl xmlns:iso4217="http://www.xbrl.org/2003/iso4217" xmlns:ixt="http://www.xbrl.org/inlineXBRL/transformation/2015-02-26" xmlns:ixt-sec="http://www.sec.gov/inlineXBRL/transformation/2015-08-31" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:nonnum="http://www.xbrl.org/dtr/type/non-numeric" xmlns:num="http://www.xbrl.org/dtr/type/numeric" xmlns:p="http://www.xbrl.org/2003/instance" xmlns:us-gaap="http://fasb.org/us-gaap/2020-01-31" xmlns:utr="http://www.xbrl.org/2009/utr" xmlns:xbrldi="http://xbrl.org/2006/xbrldi" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<link:schemaRef xlink:href="igm-20201129.xsd" xlink:type="simple"/>
<p:context id="ctx1">
<p:entity>
<p:identifier scheme="http://www.sec.gov/CIK">1234567890</p:identifier>
</p:entity>
<p:period>
<p:startDate>2020-09-27</p:startDate>
<p:endDate>2020-12-26</p:endDate>
</p:period>
</p:context>
There are no place in the code where this prefix (p) can be set and i haven't found any info in the internet about it. And moreover there are no source files of the library, so i cannot debug it and see what's going on under the hood and where this prefix come from. Prefix appears only in iXBRL generation, in standard - everything is fine.
Does anyone know anything about it?

Related

How can I disable a specific type of missing comment warning in Javadoc?

I'm using javadoc through Gradle and since upgrading to Java 18, javadoc reports following warning:
warning: use of default constructor, which does not provide a comment
I would like this warning message to be disabled so that I can check for the completeness of javadoc comments in my project by looking at the number of reported warnings. In general, missing doc comments can be disabled with the -Xdoclint:all,-missing argument but this is too coarse as in my understanding it disables all missing comment warnings. Warnings that comments are missing on default constructors are not interesting or helpful to me so I would like to disable them specifically.
Further information: The JDK commit that introduced the checking of missing comments on default constructors specifies the missing-type dc.default.constructor but I haven't been able to find a way of using this.
Unfortunately, this is not possible. -Xdoclint only provides the missing key, with no more fine-grained control.
If you want more fine-grained control, you can use the require-javadoc program instead of -Xdoclint:missing. require-javadoc never requires comments on a default constructor, which does not appear in source code. Its configuration includes the following command-line options:
--exclude=<regex> - Don't check files or directories whose pathname matches the regex
--dont-require=<regex> - Don't report problems in Java elements whose name matches the regex
--dont-require-private=<boolean> - Don't report problems in elements with private access [default: false]
--dont-require-noarg-constructor=<boolean> - Don't report problems in constructors with zero formal params [default: false]
--dont-require-trivial-properties=<boolean> - Don't report problems about trivial getters and setters [default: false]
--dont-require-type=<boolean> - Don't report problems in type declarations [default: false]
--dont-require-field=<boolean> - Don't report problems in fields [default: false]
--dont-require-method=<boolean> - Don't report problems in methods and constructors [default: false]
--require-package-info=<boolean> - Require package-info.java file to exist [default: false]
--relative=<boolean> - Report relative rather than absolute filenames [default: false]
--verbose=<boolean> - Print diagnostic information [default: false]
Note, however, that require-javadoc never warns about missing Javadoc tags such as #param and #return.

cTAKES parser output

I am trying to understand the result generated via cTAKES parser. I am unable to understand certain points-
cTAKES parser is invoked via TIKa-app
we get following result-
ctakes:AnatomicalSiteMention: liver:77:82:C1278929,C0023884
ctakes:ProcedureMention: CT scan:24:31:C0040405,C0040405,C0040405,C0040405
ctakes:ProcedureMention: CT:24:26:C0009244,C0009244,C0040405,C0040405,C0009244,C0009244,C0040405,C0009244,C0009244,C0009244,C0040405
ctakes:ProcedureMention: scan:27:31:C0034606,C0034606,C0034606,C0034606,C0441633,C0034606,C0034606,C0034606,C0034606,C0034606,C0034606
ctakes:RomanNumeralAnnotation: did:47:50:
ctakes:SignSymptomMention: lesions:62:69:C0221198,C0221198
ctakes:schema: coveredText:start:end:ontologyConceptArr
resourceName: sample
and document parsed contains -
The patient underwent a CT scan in April which did not reveal lesions in his liver
i have following questions-
why UMLS id is repeated like in ctakes:ProcedureMention: scan:27:31:C0009244,C0009244,C0040405,C0040405,C0009244,C0009244,C0040405,C0009244,C0009244,C0009244,C0040405? (cTAKES configuration properties file has annotationProps=BEGIN,END,ONTOLOGY_CONCEPT_ARR)
what does RomanNumeralAnnotation indicate?
In concept unique identifier like C0040405, do these 7 numbers have any meaning. How are these generated?
System information:
Apache tika 1.10
Apache ctakes 3.2.2

OSB fn:bea Function using XQuery Engine in Java

After some research I haven't found a solution, but quite alot of people with this problem:
I am trying to do a XQuery Transformation in a Java Application using
net.sf.saxon.s9api
However I get this error when trying to compile XQueryExecutable exec = compiler.compile(...)); my XQuery:
Error on line 13 column 3 of AivPumaRequest.xquery:
XPST0081 XQuery static error near #... fn-bea:inlinedXML(fn:concat#:
Prefix fn-bea has not been declared
Error on line 44 column 102 of AivPumaRequest.xquery:
XPST0081 XQuery static error near #... div xdt:dayTimeDuration('P1D'#:
Prefix xdt has not been declared
Error on line 199 column 3 of AivPumaRequest.xquery:
XPST0081 XQuery static error near #... fn-bea:inlinedXML(fn:concat#:
Prefix fn-bea has not been declared
Error on line 282 column 4 of AivPumaRequest.xquery:
XPST0081 XQuery static error near #... {fn-bea:inlinedXML(fn:concat#:
Prefix fn-bea has not been declared
net.sf.saxon.s9api.SaxonApiException: Prefix fn-bea has not been declared
Is there a way to static include this prefix or what am I missing so my XQuery Engine (SAXON) finds the Prefix?
The simple answer to your question is that you can declare namespace prefixes either within the query prolog using
declare namespace fn-bea = "http://some-appropriate-uri";
or in the Saxon API using
XQueryCompiler.declareNamespace("fn-bea", "http://some-appropriate-uri")
But this won't get you any further unless (a) you know what URI to bind the prefixes to, and (b) you make the functions with these names available to the query processor.
The reference to xdt:dayTimeDuration suggests to me that this query was written when XQuery was still a working draft. If you look at the 2005 working draft, for example
https://www.w3.org/TR/2005/CR-xquery-20051103/
you'll see in section 2 that it uses a built-in prefix
xdt = http://www.w3.org/2005/xpath-datatypes
By the time XQuery 1.0 became a recommendation, the dayTimeDuration data type had been moved into the standard XML Schema (xs) namespace, so you can probably simply replace "xdt" by "xs" - though you should be aware that the semantics of the language probably changed in minor details as well.
As for fn-bea:inlinedXML, the choice of prefix suggests to me that this was probably a built-in vendor extension in the BEA query processor, which was taken over by Oracle. The spec here:
https://docs.oracle.com/cd/E13162_01/odsi/docs10gr3/xquery/extensions.html
says:
fn-bea:inlinedXML Parses textual XML and returns an instance of the
XQuery 1.0 Data Model.
Which suggests that the function does something very similar to the XQuery 3.0 function fn:parse-xml(), and I suggest you try making that replacement in your query.

How to add java function to owl prolog

Unfortunately I am quite new to the world of ontologies and owl but I need to work on a piece of code which rely heavily on owl.
I am experiencing some problems trying to use a java function into owl. The situation is the following:
<rdf:Description rdf:about="&jpg;product">
<dhus:identifier rdf:parseType="Literal">
<![CDATA[
fn:tokenize(name (.), '\.')[1]
]]>
</dhus:identifier>
<img:descriptor rdf:parseType="Literal" xmlns:img="&img;">
<![CDATA[
declare namespace utils="java:com.example.jpg.JpgUtils";
]]>
<img:collection xmlns:img="&img;">
<img:raster name="preview">
<img:source>{ utils:acquireImageName(drb:path(.)) }</img:source>
</img:raster>
</img:collection>
</img:descriptor>
I am trying to pass the path to a jpg image to use as a preview using java code but I keep getting the [Fatal Error] :1:1: Content is not allowed in prolog. error.
Does anyone know how to properly obtain the file path?

Interpreted vs. Compiled XSLT 1.0 produces different JSON output

Given the following XML:
<abc>
<def>
<one>Hello</one>
<two>World</two>
</def>
</abc>
And the XSL file to transform the XML to JSON available here: http://dropbox.ashlock.us/open311/json-xml/xml-tools/xml2json_spark.xsl
When transforming using Interpreted XSLT (PROCESSOR: Apache Software Foundation, javax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl), the JSON output is:
{"abc":[{"one":"Hello","two":"World"}]}
When transforming using Compiled XSLT (PROCESSOR: Apache Software Foundation (Xalan XSLTC), javax.xml.transform.TransformerFactory=org.apache.xalan.xsltc.trax.TransformerFactoryImpl), the JSON output is:
[{"one":"Hello","two":"World"}]
Why do the 2 processors produce different results?
Saxon's output is the same as XSLTC:
[{"one":"Hello","two":"World"}]
I haven't attempted to debug the stylesheet in detail. It doesn't contain anything obviously implementation-defined, so it looks like a bug in Xalan-interpreted to me.
This pattern is questionable, though not illegal:
*[count(../*[name(../*)=name(.)])=count(../*) and count(../*)>1]
It's questionable because name(../*) is supplying a sequence of elements to the name function. That would be an error in XSLT 2.0, but in 1.0 mode it gives the name of the first selected element. I suspect that the author may have intended something like
*[count(../*[name(.)=name(current())])=count(../*) and count(../*)>1]

Categories

Resources