Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml 错误的contenttype XQuery xbrl标记逻辑_Xml_Xquery_Marklogic_Xbrl - Fatal编程技术网

Xml 错误的contenttype XQuery xbrl标记逻辑

Xml 错误的contenttype XQuery xbrl标记逻辑,xml,xquery,marklogic,xbrl,Xml,Xquery,Marklogic,Xbrl,我的上传程序在将内容上传到MarkLogic数据库时处理得非常好 declare function local:uploadFile() { for $file at $pos in xdmp:get-request-field("upload") let $filename := xdmp:get-request-field-filename("upload")[$pos] let $contenttype := xdmp:get-request-field-content-t

我的上传程序在将内容上传到MarkLogic数据库时处理得非常好

declare function local:uploadFile()
{
for $file at $pos in xdmp:get-request-field("upload")
    let $filename := xdmp:get-request-field-filename("upload")[$pos]
    let $contenttype := xdmp:get-request-field-content-type("upload")[$pos]
    let $extension := fn:replace($filename, '.*\.', '')[$pos]
    let $insert := switch ($contenttype)
        case "text/xml"
        case "text/xhtml"
        case "text/csv"
        case "text/plain"
        case "application/json"
            return xdmp:document-insert($filename,xdmp:unquote($file))
        case "application/octet-stream"
            return switch ($extension)
            case "gpx"
                return xdmp:document-insert($filename,xdmp:unquote(xdmp:quote(binary{xs:hexBinary($file)})))
            default
                return xdmp:document-insert($filename,$file)
        default
            return xdmp:document-insert($filename,$file)
    return fn:concat("file '",$filename,"' uploaded, contenttype: ",$contenttype," extension: ",$extension)
};
问题是此文档被视为XML/XBRL:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="http://www.companieshouse.gov.uk/ef/xbrl/uk/fr/gaap/ae/2009-06-21/stylesheet/CH-AE-dormant-stylesheet.xsl"?>
<xbrl
    xmlns="http://www.xbrl.org/2003/instance"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ae="http://www.companieshouse.gov.uk/ef/xbrl/uk/fr/gaap/ae/2009-06-21"
    xmlns:gc="http://www.xbrl.org/uk/fr/gcd/2004-12-01"
    xmlns:html="http://www.w3.org/1999/xhtml"
    xmlns:iso4217="http://www.xbrl.org/2003/iso4217"
    xmlns:link="http://www.xbrl.org/2003/linkbase"
    xmlns:pt="http://www.xbrl.org/uk/fr/gaap/pt/2004-12-01"
    xmlns:xbrli="http://www.xbrl.org/2003/instance"
    xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" 
xlink:href="http://www.companieshouse.gov.uk/ef/xbrl/uk/fr/gaap/ae/2009-06-21/uk-gaap-ae-2009-06-21.xsd" 
xlink:type="simple"/>
    <ae:CompanyDormant contextRef="y2017">true</ae:CompanyDormant>
    <gc:EntityNames>
        <gc:EntityCurrentLegalName contextRef="y2017">HUNTS GROUP PLC</gc:EntityCurrentLegalName>
    </gc:EntityNames>
    <ae:CompanyIdentifyingNumbers>
        <ae:CompaniesHouseRegisteredNumber contextRef="y2017">03975172</ae:CompaniesHouseRegisteredNumber>
    </ae:CompanyIdentifyingNumbers>
    <gc:StatementDatesPeriodsCovered>
        <gc:BalanceSheetDate contextRef="e2017">2017-04-30</gc:BalanceSheetDate>
    </gc:StatementDatesPeriodsCovered>
    <pt:ShareholderFunds precision="6" contextRef="e2017" unitRef="GBP">12500</pt:ShareholderFunds>
    <pt:ShareholderFunds precision="6" contextRef="e2016" unitRef="GBP">12500</pt:ShareholderFunds>
    <pt:NetAssetsLiabilitiesIncludingPensionAssetLiability precision="5" contextRef="e2017" unitRef="GBP">12500</pt:NetAssetsLiabilitiesIncludingPensionAssetLiability>
    <pt:NetAssetsLiabilitiesIncludingPensionAssetLiability precision="5" contextRef="e2016" unitRef="GBP">12500</pt:NetAssetsLiabilitiesIncludingPensionAssetLiability>
    <pt:CashBankInHand precision="5" contextRef="e2017" unitRef="GBP">12500</pt:CashBankInHand>
    <pt:CashBankInHand precision="5" contextRef="e2016" unitRef="GBP">12500</pt:CashBankInHand>
    <pt:EquityAuthorisedDetails>
        <pt:TypeOrdinaryShare contextRef="y2017">Ordinary</pt:TypeOrdinaryShare>
        <pt:NumberOrdinarySharesAuthorised precision="INF" contextRef="e2017" unitRef="shares">50000</pt:NumberOrdinarySharesAuthorised>
        <pt:ParValueOrdinaryShare precision="INF" contextRef="y2017" unitRef="GBP">1</pt:ParValueOrdinaryShare>
    </pt:EquityAuthorisedDetails>
    <pt:DetailsOrdinarySharesAllotted>
        <pt:TypeOrdinaryShare contextRef="y2017">Ordinary</pt:TypeOrdinaryShare>
        <pt:ParValueOrdinaryShare precision="INF" contextRef="y2017" unitRef="GBP">1</pt:ParValueOrdinaryShare>
        <pt:ValueOrdinarySharesAllotted precision="5" contextRef="e2017" unitRef="GBP">12500</pt:ValueOrdinarySharesAllotted>
        <pt:ValueOrdinarySharesAllotted precision="5" contextRef="e2016" unitRef="GBP">12500</pt:ValueOrdinarySharesAllotted>
        <pt:NumberOrdinarySharesAllotted precision="INF" contextRef="e2017" unitRef="shares">12500</pt:NumberOrdinarySharesAllotted>
    </pt:DetailsOrdinarySharesAllotted>
    <pt:DateApproval contextRef="e2017">2017-10-13</pt:DateApproval>
    <pt:ApprovalDetails>
        <pt:NameApprovingDirector contextRef="y2017">Mr. David Charles Hunt</pt:NameApprovingDirector>
    </pt:ApprovalDetails>
    <ae:CompanyEntitledToExemptionUnderSection480CompaniesAct2006 contextRef="y2017">true</ae:CompanyEntitledToExemptionUnderSection480CompaniesAct2006>
    <ae:MembersHaveNotRequiredCompanyToObtainAnAudit contextRef="y2017">true</ae:MembersHaveNotRequiredCompanyToObtainAnAudit>
    <ae:DirectorsAcknowledgeTheirResponsibilitiesUnderCompaniesAct contextRef="y2017">true</ae:DirectorsAcknowledgeTheirResponsibilitiesUnderCompaniesAct>
    <ae:AccountsAreInAccordanceWithSpecialProvisionsCompaniesActRelatingToSmallCompanies contextRef="y2017">true</ae:AccountsAreInAccordanceWithSpecialProvisionsCompaniesActRelatingToSmallCompanies>
    <unit id="shares">
        <measure>xbrli:shares</measure>
    </unit>
    <unit id="GBP">
        <measure>iso4217:GBP</measure>
    </unit>
    <unit id="pure">
        <measure>xbrli:pure</measure>
    </unit>
    <context id="y2017">
        <entity>
            <identifier scheme="/results">HUNTS GROUP PLC</identifier>
        </entity>
        <period>
            <startDate>2016-05-01</startDate>
            <endDate>2017-04-30</endDate>
        </period>
    </context>
    <context id="y2016">
        <entity>
            <identifier scheme="/results">HUNTS GROUP PLC</identifier>
        </entity>
        <period>
            <startDate>2015-05-01</startDate>
            <endDate>2016-04-30</endDate>
        </period>
    </context>
    <context id="s2016">
        <entity>
            <identifier scheme="/results">HUNTS GROUP PLC</identifier>
        </entity>
        <period>
            <instant>2015-04-30</instant>
        </period>
    </context>
    <context id="e2016">
        <entity>
            <identifier scheme="/results">HUNTS GROUP PLC</identifier>
        </entity>
        <period>
            <instant>2016-04-30</instant>
        </period>
    </context>
    <context id="s2017">
        <entity>
            <identifier scheme="/results">HUNTS GROUP PLC</identifier>
        </entity>
        <period>
            <instant>2016-04-30</instant>
        </period>
    </context>
    <context id="e2017">
        <entity>
            <identifier scheme="/results">HUNTS GROUP PLC</identifier>
        </entity>
        <period>
            <instant>2017-04-30</instant>
        </period>
    </context>
    <ae:CompaniesHouseDocumentAuthentication contextRef="y2017"></ae:CompaniesHouseDocumentAuthentication>
    <ae:DateAccountsReceived contextRef="e2017">2017-10-16</ae:DateAccountsReceived>
</xbrl>

真的
亨特集团有限公司
03975172
2017-04-30
12500
12500
12500
12500
12500
12500
普通的
50000
1.
普通的
1.
12500
12500
12500
2017-10-13
大卫·查尔斯·亨特先生
真的
真的
真的
真的
xbrli:股票
iso4217:GBP
纯的
亨特集团有限公司
2016-05-01
2017-04-30
亨特集团有限公司
2015-05-01
2016-04-30
亨特集团有限公司
2015-04-30
亨特集团有限公司
2016-04-30
亨特集团有限公司
2016-04-30
亨特集团有限公司
2017-04-30
2017-10-16
由于本网站的限制,我无法发布给我带来问题的整个文档。因此,这里只是文档的标题

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xbrli:xbrl xmlns:xbrli="http://www.xbrl.org/2003/instance" xml:lang="nl" xmlns:kvk-i="http://www.nltaxonomie.nl/nt12/kvk/20171213/dictionary/kvk-data" xmlns:venj-bw2-dm="http://www.nltaxonomie.nl/nt12/venj/20171213/dictionary/venj-bw2-domains" xmlns:venj-bw2-i="http://www.nltaxonomie.nl/nt12/venj/20171213/dictionary/venj-bw2-data" xmlns:rj-i="http://www.nltaxonomie.nl/nt12/rj/20171213/dictionary/rj-data" xmlns:rj-t="http://www.nltaxonomie.nl/nt12/rj/20171213/dictionary/rj-tuples"   xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:nl-cd="http://www.nltaxonomie.nl/nt12/sbr/20170515/dictionary/nl-common-data" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xbrldi="http://xbrl.org/2006/xbrldi" xmlns:iso4217="http://www.xbrl.org/2003/iso4217" xmlns:venj-bw2-dim="http://www.nltaxonomie.nl/nt12/venj/20171213/dictionary/venj-bw2-axes">
    <link:schemaRef xlink:type="simple" xlink:href="http://www.nltaxonomie.nl/nt12/kvk/20171213/entrypoints/kvk-rpt-jaarverantwoording-2017-nlgaap-middelgroot-publicatiestukken.xsd"/>
    <xbrli:context id="FY17d">
        <xbrli:entity>
            <xbrli:identifier scheme="http://www.kvk.nl/kvk-id">30267975</xbrli:identifier>
        </xbrli:entity>
        <xbrli:period>
            <xbrli:startDate>2017-01-01</xbrli:startDate>
            <xbrli:endDate>2017-12-31</xbrli:endDate>
        </xbrli:period>
    </xbrli:context>

30267975
2017-01-01
2017-12-31
我的上传者在最后一个案例中看到了这个文档,即“应用程序/八位字节流”,我不明白为什么。你们知道吗


提前感谢。

在upload.xqy文件中添加一个额外的案例,
案例“xbrl”
,可以解决此问题:

declare function local:uploadFile()
{
for $file at $pos in xdmp:get-request-field("upload")
    let $filename := xdmp:get-request-field-filename("upload")[$pos]
    let $contenttype := xdmp:get-request-field-content-type("upload")[$pos]
    let $extension := fn:replace($filename, '.*\.', '')[$pos]
    let $insert := switch ($contenttype)
        case "text/xml"
        case "text/xhtml"
        case "text/csv"
        case "text/plain"
        case "application/json"
            return xdmp:document-insert($filename,xdmp:unquote($file))
        case "application/octet-stream"
            return switch ($extension)
            case "gpx"
            case "xbrl"
                return xdmp:document-insert($filename,xdmp:unquote(xdmp:quote(binary{xs:hexBinary($file)})))
            default
                return xdmp:document-insert($filename,$file)
        default
            return xdmp:document-insert($filename,$file)
    return fn:concat("file '",$filename,"' uploaded, contenttype: ",$contenttype," extension: ",$extension)
};

使用所谓的Mimetypes部分中的管理UI在MarkLogic中声明xbrl mimetype和扩展也可能会有所帮助。也许是以后需要探索的东西。