0

I'm Currently creating the JPK XML Report Requirement for Poland, but when I run the XML and XSD on FREEFORMATTER.COM, I get this error:

Cvc-elt.1.a: Cannot Find The Declaration Of Element 'tns:JPK'., Line '1', Column '298'.

This is my XML:

<?xml version="1.0" encoding="UTF-8"?>
<tns:JPK xmlns:tns="http://jpk.mf.gov.pl/wzor/2017/11/13/1113/" xmlns:etd="http://crd.gov.pl/xml/schematy/dziedzinowe/mf/2016/01/25/eD/DefinicjeTypy/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jpk.mf.gov.pl/wzor/2017/11/13/1113/ Schemat_JPK_VAT(3)_v1-1.xsd">
  <tns:Naglowek>
    <tns:KodFormularza kodSystemowy="JPK_VAT (3)" wersjaSchemy="1-1">JPK_VAT</tns:KodFormularza>
    <tns:WariantFormularza>1</tns:WariantFormularza>
    <tns:DataWytworzeniaJPK>2020-02-27T00:18:17Z</tns:DataWytworzeniaJPK>
    <tns:NazwaSystemu>Oracle E-Business Suite 12.2.9</tns:NazwaSystemu>
    <tns:CelZlozenia>0</tns:CelZlozenia>
    <tns:DataOd>2016-11-01</tns:DataOd>
    <tns:DataDo>2016-11-30</tns:DataDo>
    <tns:KodUrzedu/>
    <tns:Rok>2016</tns:Rok>
    <tns:Miesiac>NOV</tns:Miesiac>
  </tns:Naglowek>
  <tns:Podmiot1>
    <tns:OsobaNiefizyczna>
      <tns:NIP>5270201490</tns:NIP>
      <tns:PelnaNazwa>Vision Poland Report</tns:PelnaNazwa>
      <tns:Email>juan.miguel.isip@oracle.com</tns:Email>
      <tns:Telefon>9999</tns:Telefon>
    </tns:OsobaNiefizyczna>
  </tns:Podmiot1>
  <tns:Deklaracja>
    <tns:PozycjeSzczegolowe>
      <tns:K_43>1000</tns:K_43>
      <tns:K_43>220</tns:K_43>
      <tns:K_43>999</tns:K_43>
      <tns:K_43>219.78</tns:K_43>
    </tns:PozycjeSzczegolowe>
    <tns:Pouczenia>1</tns:Pouczenia>
  </tns:Deklaracja>
  <tns:ZakupWiersz>
    <tns:LpZakupu>1</tns:LpZakupu>
    <tns:NrDostawcy>1298744383</tns:NrDostawcy>
    <tns:NazwaDostawcy>Winters Supply Company</tns:NazwaDostawcy>
    <tns:AdresDostawcy>Vzkolna 77/PL/14-221/.Olecko    14-221 Olecko PL   PL</tns:AdresDostawcy>
    <tns:DowodZakupu>JPK_12FEB2020_01</tns:DowodZakupu>
    <tns:DataZakupu>2016-11-01</tns:DataZakupu>
    <tns:DataWplywu>2016-11-01</tns:DataWplywu>
    <tns:K_43>1000</tns:K_43>
    <tns:K_43>220</tns:K_43>
  </tns:ZakupWiersz>
  <tns:ZakupWiersz>
    <tns:LpZakupu>2</tns:LpZakupu>
    <tns:NrDostawcy>53998235506</tns:NrDostawcy>
    <tns:NazwaDostawcy>National Poultry Suppliers</tns:NazwaDostawcy>
    <tns:AdresDostawcy>Pzkolna 32/PL/20-211/.Olecko    20-211 O PL   PL</tns:AdresDostawcy>
    <tns:DowodZakupu>JPK_19FEB2020_01</tns:DowodZakupu>
    <tns:DataZakupu>2016-11-01</tns:DataZakupu>
    <tns:DataWplywu>2016-11-01</tns:DataWplywu>
    <tns:K_43>999</tns:K_43>
    <tns:K_43>219.78</tns:K_43>
  </tns:ZakupWiersz>
  <tns:ZakupCtrl>
    <tns:LiczbaWierszyZakupow>2</tns:LiczbaWierszyZakupow>
    <tns:PodatekNaliczony>439.78</tns:PodatekNaliczony>
  </tns:ZakupCtrl>
</tns:JPK>

The XSD is from the Poland Government (it's quite long so i didn't include it in the post.

I've already reviewed the answer posted in a similar SO thread (Cvc-elt.1: Cannot Find The Declaration Of Element 'soap:Envelope') but i cannot update the XSD as this is a Government Document.

Please advise.

Migs Isip
  • 1,450
  • 3
  • 23
  • 50

1 Answers1

0

The XML processor cannot find a global element declaration with name 'JPK' and namespace 'http://jpk.mf.gov.pl/wzor/2017/11/13/1113/'. Possible reasons for this include:

  • The namespace in the XML document does not match the targetNamespace in the XSD.
  • The name 'JPK' in the XML document does not match the name of the global element in the XSD.
  • The element 'JPK' is declared in the XSD, but it is a local element declaration (so not visible outside of that XSD)
  • The XML processor has located an XSD, but it is not the correct version (which would then cause one of the above errors)
kimbert
  • 2,376
  • 1
  • 10
  • 20