XML well-formed error
Wednesday, 6 June 2018 · 9 messages
DS
DK Singh6 Jun 2018 11:16 #
Hi All,
I have a XML file when i apply xslt using
xslt:transform function it is giving well formed error, even i tried on BaseX UI using xslt:transform function
[FODC0002] "" (Line 1): The markup in the document following the root element must be well-formed.
but when the same file i transform on the oxygeng editor it getting transformed, can anyone suggest what going wrong.
Regards
Dharmendra Kumar SinghCG
Christian Grün6 Jun 2018 11:19 #
Hi Dhamendra Kumar,
As usual, please provide us with a little example (see http://sscce.org/ for more information).
Thanks in advance,
Christian
Quoted text · DK Singh · 14 lines
On Wed, Jun 6, 2018 at 11:16 AM, DK Singh <dharam.mahi at gmail.com> wrote: > Hi All, > I have a XML file when i apply xslt using xslt:transform function it is > giving well formed error, even i tried on BaseX UI using xslt:transform > function > > [FODC0002] "" (Line 1): The markup in the document following the root > element must be well-formed. > > but when the same file i transform on the oxygeng editor it getting > transformed, can anyone suggest what going wrong. > Regards > Dharmendra Kumar Singh >
DS
DK Singh6 Jun 2018 11:53 #
Hi Christian,
i am running the simple query on Basex GUI
let $xml := fn:doc('D:\2018\VCLP-A2 - admin.xml')
let $xsl := fn:doc('D:\2018\DBK2BloomsburyDbk.xslt')
return xslt:transform($xml,$xsl)
Regards
Dharmendra Kumar SinghQuoted text · Christian Grün · 28 lines
On Wed, Jun 6, 2018 at 2:49 PM, Christian Grün <christian.gruen at gmail.com> wrote: > Hi Dhamendra Kumar, > > As usual, please provide us with a little example (see http://sscce.org/ > for more information). > > Thanks in advance, > Christian > > > On Wed, Jun 6, 2018 at 11:16 AM, DK Singh <dharam.mahi at gmail.com> wrote: > >> Hi All, >> I have a XML file when i apply xslt using xslt:transform function it is >> giving well formed error, even i tried on BaseX UI using xslt:transform >> function >> >> [FODC0002] "" (Line 1): The markup in the document following the root >> element must be well-formed. >> >> but when the same file i transform on the oxygeng editor it getting >> transformed, can anyone suggest what going wrong. >> Regards >> Dharmendra Kumar Singh >> > >
CG
Christian Grün6 Jun 2018 11:54 #
Hi
Dharmendra Kumar.
P
lease provide us with a little self-contained example (see http://sscce.org/ for more information).
Thanks in advance ;)
Christian
Quoted text · DK Singh · 44 lines
On Wed, Jun 6, 2018 at 11:53 AM, DK Singh <dharam.mahi at gmail.com> wrote: > Hi Christian, > i am running the simple query on Basex GUI > > let $xml := fn:doc('D:\2018\VCLP-A2 - admin.xml') > let $xsl := fn:doc('D:\2018\DBK2BloomsburyDbk.xslt') > return xslt:transform($xml,$xsl) > Regards > > Dharmendra Kumar Singh > > On Wed, Jun 6, 2018 at 2:49 PM, Christian Grün <christian.gruen at gmail.com> > wrote: > >> Hi Dhamendra Kumar, >> >> As usual, >> >> please provide us with a little example (see http://sscce.org/ for more >> information). >> >> >> Thanks in advance, >> Christian >> >> >> On Wed, Jun 6, 2018 at 11:16 AM, DK Singh <dharam.mahi at gmail.com> wrote: >> >>> Hi All, >>> I have a XML file when i apply xslt using xslt:transform function it is >>> giving well formed error, even i tried on BaseX UI using >>> xslt:transform function >>> >>> [FODC0002] "" (Line 1): The markup in the document following the root >>> element must be well-formed. >>> >>> but when the same file i transform on the oxygeng editor it getting >>> transformed, can anyone suggest what going wrong. >>> Regards >>> Dharmendra Kumar Singh >>> >> >> >
DS
DK Singh6 Jun 2018 12:07 #
Hi Christian for your reference i am attaching the XSLT and XML which i am trying to transfom using BaseX GUI
QUERY
=========
let $xml := fn:doc('D:\2018\VCLP-A2 - admin.xml')
let $xsl := fn:doc('D:\2018\DBK2BloomsburyDbk.xslt')
return xslt:transform($xml,$xsl)Error
==========
Error:
Stopped at D:/2017/BLOOMSBURRY/testing-code/eBloomsbury/file, 3/23: [FODC0002] "" (Line 1): The markup in the document following the root element must be well-formed.
you can try out to simply run the query on BaseX GUI , i have attached the XML and XSLt
Regards
Dharmendra Kumar Sngh
Quoted text · Christian Grün · 62 lines
On Wed, Jun 6, 2018 at 3:24 PM, Christian Grün <christian.gruen at gmail.com> wrote: > Hi > > Dharmendra Kumar. > > P > lease provide us with a little self-contained example (see > http://sscce.org/ for more information). > > > Thanks in advance ;) > Christian > > > > On Wed, Jun 6, 2018 at 11:53 AM, DK Singh <dharam.mahi at gmail.com> wrote: > >> Hi Christian, >> i am running the simple query on Basex GUI >> >> let $xml := fn:doc('D:\2018\VCLP-A2 - admin.xml') >> let $xsl := fn:doc('D:\2018\DBK2BloomsburyDbk.xslt') >> return xslt:transform($xml,$xsl) >> Regards >> >> Dharmendra Kumar Singh >> >> On Wed, Jun 6, 2018 at 2:49 PM, Christian Grün <christian.gruen at gmail.com >> > wrote: >> >>> Hi Dhamendra Kumar, >>> >>> As usual, >>> >>> please provide us with a little example (see http://sscce.org/ for more >>> information). >>> >>> >>> Thanks in advance, >>> Christian >>> >>> >>> On Wed, Jun 6, 2018 at 11:16 AM, DK Singh <dharam.mahi at gmail.com> wrote: >>> >>>> Hi All, >>>> I have a XML file when i apply xslt using xslt:transform function it is >>>> giving well formed error, even i tried on BaseX UI using >>>> xslt:transform function >>>> >>>> [FODC0002] "" (Line 1): The markup in the document following the root >>>> element must be well-formed. >>>> >>>> but when the same file i transform on the oxygeng editor it getting >>>> transformed, can anyone suggest what going wrong. >>>> Regards >>>> Dharmendra Kumar Singh >>>> >>> >>> >> >
AB
Andy Bunce6 Jun 2018 12:56 #
Hi Dharmendra Kumar,
When I run this in Oxygen, loading the result into an editor window, I get the same message that BaseX gives:
Description: The markup in the document following the root element must be well-formed.
Start location: 1:68199
URL:
http://www.saxonica.com/html/documentation/javadoc/net/sf/saxon/trans/SaxonErrorCode.html#SXXP0003
Your transform is not generating a valid XML document.
Regards
/Andy
Quoted text · DK Singh · 91 lines
On 6 June 2018 at 11:07, DK Singh <dharam.mahi at gmail.com> wrote: > Hi Christian for your reference i am attaching the XSLT and XML which i am > trying to transfom using BaseX GUI > > QUERY > ========= > > let $xml := fn:doc('D:\2018\VCLP-A2 - admin.xml') > let $xsl := fn:doc('D:\2018\DBK2BloomsburyDbk.xslt') > return xslt:transform($xml,$xsl) > > Error > ========== > Error: > Stopped at D:/2017/BLOOMSBURRY/testing-code/eBloomsbury/file, 3/23: > [FODC0002] "" (Line 1): The markup in the document following the root > element must be well-formed. > > you can try out to simply run the query on BaseX GUI , i have attached the > XML and XSLt > > Regards > Dharmendra Kumar Sngh > > > > On Wed, Jun 6, 2018 at 3:24 PM, Christian Grün <christian.gruen at gmail.com> > wrote: > >> Hi >> >> Dharmendra Kumar. >> >> P >> lease provide us with a little self-contained example (see >> http://sscce.org/ for more information). >> >> >> Thanks in advance ;) >> Christian >> >> >> >> On Wed, Jun 6, 2018 at 11:53 AM, DK Singh <dharam.mahi at gmail.com> wrote: >> >>> Hi Christian, >>> i am running the simple query on Basex GUI >>> >>> let $xml := fn:doc('D:\2018\VCLP-A2 - admin.xml') >>> let $xsl := fn:doc('D:\2018\DBK2BloomsburyDbk.xslt') >>> return xslt:transform($xml,$xsl) >>> Regards >>> >>> Dharmendra Kumar Singh >>> >>> On Wed, Jun 6, 2018 at 2:49 PM, Christian Grün < >>> christian.gruen at gmail.com> wrote: >>> >>>> Hi Dhamendra Kumar, >>>> >>>> As usual, >>>> >>>> please provide us with a little example (see http://sscce.org/ for >>>> more information). >>>> >>>> >>>> Thanks in advance, >>>> Christian >>>> >>>> >>>> On Wed, Jun 6, 2018 at 11:16 AM, DK Singh <dharam.mahi at gmail.com> >>>> wrote: >>>> >>>>> Hi All, >>>>> I have a XML file when i apply xslt using xslt:transform function it >>>>> is giving well formed error, even i tried on BaseX UI using >>>>> xslt:transform function >>>>> >>>>> [FODC0002] "" (Line 1): The markup in the document following the root >>>>> element must be well-formed. >>>>> >>>>> but when the same file i transform on the oxygeng editor it getting >>>>> transformed, can anyone suggest what going wrong. >>>>> Regards >>>>> Dharmendra Kumar Singh >>>>> >>>> >>>> >>> >> >
DS
DK Singh6 Jun 2018 13:18 #
it is getting transformed on oxygen, but in the basex GUI not getting transformed, my req is to transformed file has to be write on the file system, but on the Basex GUI not getting transformed
Regards
Dharmendra Kumar Singh
Quoted text · Andy Bunce · 111 lines
On Wed 6 Jun, 2018, 4:26 PM Andy Bunce, <bunce.andy at gmail.com> wrote: > Hi Dharmendra Kumar, > > When I run this in Oxygen, loading the result into an editor window, I get > the same message that BaseX gives: > > Description: The markup in the document following the root element must be > well-formed. > Start location: 1:68199 > URL: > http://www.saxonica.com/html/documentation/javadoc/net/sf/saxon/trans/SaxonErrorCode.html#SXXP0003 > > > Your transform is not generating a valid XML document. > > Regards > /Andy > > On 6 June 2018 at 11:07, DK Singh <dharam.mahi at gmail.com> wrote: > >> Hi Christian for your reference i am attaching the XSLT and XML which i >> am trying to transfom using BaseX GUI >> >> QUERY >> ========= >> >> let $xml := fn:doc('D:\2018\VCLP-A2 - admin.xml') >> let $xsl := fn:doc('D:\2018\DBK2BloomsburyDbk.xslt') >> return xslt:transform($xml,$xsl) >> >> Error >> ========== >> Error: >> Stopped at D:/2017/BLOOMSBURRY/testing-code/eBloomsbury/file, 3/23: >> [FODC0002] "" (Line 1): The markup in the document following the root >> element must be well-formed. >> >> you can try out to simply run the query on BaseX GUI , i have attached >> the XML and XSLt >> >> Regards >> Dharmendra Kumar Sngh >> >> >> >> On Wed, Jun 6, 2018 at 3:24 PM, Christian Grün <christian.gruen at gmail.com >> > wrote: >> >>> Hi >>> >>> Dharmendra Kumar. >>> >>> P >>> lease provide us with a little self-contained example (see >>> http://sscce.org/ for more information). >>> >>> >>> Thanks in advance ;) >>> Christian >>> >>> >>> >>> On Wed, Jun 6, 2018 at 11:53 AM, DK Singh <dharam.mahi at gmail.com> wrote: >>> >>>> Hi Christian, >>>> i am running the simple query on Basex GUI >>>> >>>> let $xml := fn:doc('D:\2018\VCLP-A2 - admin.xml') >>>> let $xsl := fn:doc('D:\2018\DBK2BloomsburyDbk.xslt') >>>> return xslt:transform($xml,$xsl) >>>> Regards >>>> >>>> Dharmendra Kumar Singh >>>> >>>> On Wed, Jun 6, 2018 at 2:49 PM, Christian Grün < >>>> christian.gruen at gmail.com> wrote: >>>> >>>>> Hi Dhamendra Kumar, >>>>> >>>>> As usual, >>>>> >>>>> please provide us with a little example (see http://sscce.org/ for >>>>> more information). >>>>> >>>>> >>>>> Thanks in advance, >>>>> Christian >>>>> >>>>> >>>>> On Wed, Jun 6, 2018 at 11:16 AM, DK Singh <dharam.mahi at gmail.com> >>>>> wrote: >>>>> >>>>>> Hi All, >>>>>> I have a XML file when i apply xslt using xslt:transform function it >>>>>> is giving well formed error, even i tried on BaseX UI using >>>>>> xslt:transform function >>>>>> >>>>>> [FODC0002] "" (Line 1): The markup in the document following the root >>>>>> element must be well-formed. >>>>>> >>>>>> but when the same file i transform on the oxygeng editor it getting >>>>>> transformed, can anyone suggest what going wrong. >>>>>> Regards >>>>>> Dharmendra Kumar Singh >>>>>> >>>>> >>>>> >>>> >>> >> >
MH
Martin Honnen6 Jun 2018 13:30 #
I think the problem is that your XSLT generates a result fragment with several top level chapter elements, lacking a single root element containing the other elements.
So you need to change the stylesheet to create a single root element or someone with more BaseX inside skills needs to tell how to use and process the result of a stylesheet that is not a well-formed document but a fragment.
Quoted text · DK Singh · 129 lines
Am 06.06.2018 um 13:18 schrieb DK Singh: > it is getting transformed on oxygen, but in the basex GUI not getting > transformed, my req is to transformed file has to be write on the file > system, but on the Basex GUI not getting transformed > > Regards > Dharmendra Kumar Singh > > On Wed 6 Jun, 2018, 4:26 PM Andy Bunce, <bunce.andy at gmail.com > <mailto:bunce.andy at gmail.com>> wrote: > > Hi Dharmendra Kumar, > > When I run this in Oxygen, loading the result into an editor > window, I get the same message that BaseX gives: > > Description: The markup in the document following the root element > must be well-formed. > Start location: 1:68199 > URL: > http://www.saxonica.com/html/documentation/javadoc/net/sf/saxon/trans/SaxonErrorCode.html#SXXP0003 > > > Your transform is not generating a valid XML document. > > Regards > /Andy > > On 6 June 2018 at 11:07, DK Singh <dharam.mahi at gmail.com > <mailto:dharam.mahi at gmail.com>> wrote: > > Hi Christian for your reference i am attaching the XSLT and > XML which i am trying to transfom using BaseX GUI > > QUERY > ========= > > let $xml := fn:doc('D:\2018\VCLP-A2 - admin.xml') > let $xsl := fn:doc('D:\2018\DBK2BloomsburyDbk.xslt') > return xslt:transform($xml,$xsl) > > Error > ========== > Error: > Stopped at D:/2017/BLOOMSBURRY/testing-code/eBloomsbury/file, > 3/23: > [FODC0002] "" (Line 1): The markup in the document following > the root element must be well-formed. > > you can try out to simply run the query on BaseX GUI , i have > attached the XML and XSLt > > Regards > Dharmendra Kumar Sngh > > > > On Wed, Jun 6, 2018 at 3:24 PM, Christian Grün > <christian.gruen at gmail.com <mailto:christian.gruen at gmail.com>> > wrote: > > Hi > > Dharmendra Kumar. > > P > lease provide us with a little self-contained example (see > http://sscce.org/for more information). > > > Thanks in advance ;) > Christian > > > > On Wed, Jun 6, 2018 at 11:53 AM, DK Singh > <dharam.mahi at gmail.com <mailto:dharam.mahi at gmail.com>> wrote: > > Hi Christian, > i am running the simple query on Basex GUI > > let $xml := fn:doc('D:\2018\VCLP-A2 - admin.xml') > let $xsl := fn:doc('D:\2018\DBK2BloomsburyDbk.xslt') > return xslt:transform($xml,$xsl) > Regards > > Dharmendra Kumar Singh > > On Wed, Jun 6, 2018 at 2:49 PM, Christian Grün > <christian.gruen at gmail.com > <mailto:christian.gruen at gmail.com>> wrote: > > Hi Dhamendra Kumar, > > As usual, > > please provide us with a little example (see > http://sscce.org/ for more information). > > > Thanks in advance, > Christian > > > On Wed, Jun 6, 2018 at 11:16 AM, DK Singh > <dharam.mahi at gmail.com > <mailto:dharam.mahi at gmail.com>> wrote: > > Hi All, > I have a XML file when i apply xslt using > xslt:transform function it is giving well > formed error, even i tried on BaseX UI using > xslt:transform function > > [FODC0002] "" (Line 1): The markup in the > document following the root element must be > well-formed. > > but when the same file i transform on the > oxygeng editor it getting transformed, can > anyone suggest what going wrong. > Regards > Dharmendra Kumar Singh > > > > > >
CG
Christian Grün6 Jun 2018 13:34 #
One more solution could be to receive the result as text and parse it as XML fragments:
let $xml := fn:doc('VCLP-A2 - admin.xml')
let $xsl := fn:doc('DBK2BloomsburyDbk.xslt')
let $result := xslt:transform-text($xml,$xsl)
return parse-xml-fragment($result)I didn’t try if it works out of the box.
Thanks all,
Christian
Quoted text · Martin Honnen · 133 lines
On Wed, Jun 6, 2018 at 1:30 PM, Martin Honnen <martin.honnen at gmx.de> wrote: > I think the problem is that your XSLT generates a result fragment with > several top level chapter elements, lacking a single root element > containing the other elements. > So you need to change the stylesheet to create a single root element or > someone with more BaseX inside skills needs to tell how to use and process > the result of a stylesheet that is not a well-formed document but a > fragment. > > > Am 06.06.2018 um 13:18 schrieb DK Singh: > > it is getting transformed on oxygen, but in the basex GUI not getting > transformed, my req is to transformed file has to be write on the file > system, but on the Basex GUI not getting transformed > > Regards > Dharmendra Kumar Singh > > On Wed 6 Jun, 2018, 4:26 PM Andy Bunce, <bunce.andy at gmail.com> wrote: > >> Hi Dharmendra Kumar, >> >> When I run this in Oxygen, loading the result into an editor window, I >> get the same message that BaseX gives: >> >> Description: The markup in the document following the root element must >> be well-formed. >> Start location: 1:68199 >> URL: http://www.saxonica.com/html/documentation/javadoc/net/sf/ >> saxon/trans/SaxonErrorCode.html#SXXP0003 >> >> >> Your transform is not generating a valid XML document. >> >> Regards >> /Andy >> >> On 6 June 2018 at 11:07, DK Singh <dharam.mahi at gmail.com> wrote: >> >>> Hi Christian for your reference i am attaching the XSLT and XML which i >>> am trying to transfom using BaseX GUI >>> >>> QUERY >>> ========= >>> >>> let $xml := fn:doc('D:\2018\VCLP-A2 - admin.xml') >>> let $xsl := fn:doc('D:\2018\DBK2BloomsburyDbk.xslt') >>> return xslt:transform($xml,$xsl) >>> >>> Error >>> ========== >>> Error: >>> Stopped at D:/2017/BLOOMSBURRY/testing-code/eBloomsbury/file, 3/23: >>> [FODC0002] "" (Line 1): The markup in the document following the root >>> element must be well-formed. >>> >>> you can try out to simply run the query on BaseX GUI , i have attached >>> the XML and XSLt >>> >>> Regards >>> Dharmendra Kumar Sngh >>> >>> >>> >>> On Wed, Jun 6, 2018 at 3:24 PM, Christian Grün < >>> christian.gruen at gmail.com> wrote: >>> >>>> Hi >>>> >>>> Dharmendra Kumar. >>>> >>>> P >>>> lease provide us with a little self-contained example (see >>>> http://sscce.org/ for more information). >>>> >>>> >>>> Thanks in advance ;) >>>> Christian >>>> >>>> >>>> >>>> On Wed, Jun 6, 2018 at 11:53 AM, DK Singh <dharam.mahi at gmail.com> >>>> wrote: >>>> >>>>> Hi Christian, >>>>> i am running the simple query on Basex GUI >>>>> >>>>> let $xml := fn:doc('D:\2018\VCLP-A2 - admin.xml') >>>>> let $xsl := fn:doc('D:\2018\DBK2BloomsburyDbk.xslt') >>>>> return xslt:transform($xml,$xsl) >>>>> Regards >>>>> >>>>> Dharmendra Kumar Singh >>>>> >>>>> On Wed, Jun 6, 2018 at 2:49 PM, Christian Grün < >>>>> christian.gruen at gmail.com> wrote: >>>>> >>>>>> Hi Dhamendra Kumar, >>>>>> >>>>>> As usual, >>>>>> >>>>>> please provide us with a little example (see http://sscce.org/ for >>>>>> more information). >>>>>> >>>>>> >>>>>> Thanks in advance, >>>>>> Christian >>>>>> >>>>>> >>>>>> On Wed, Jun 6, 2018 at 11:16 AM, DK Singh <dharam.mahi at gmail.com> >>>>>> wrote: >>>>>> >>>>>>> Hi All, >>>>>>> I have a XML file when i apply xslt using xslt:transform function it >>>>>>> is giving well formed error, even i tried on BaseX UI using >>>>>>> xslt:transform function >>>>>>> >>>>>>> [FODC0002] "" (Line 1): The markup in the document following the >>>>>>> root element must be well-formed. >>>>>>> >>>>>>> but when the same file i transform on the oxygeng editor it getting >>>>>>> transformed, can anyone suggest what going wrong. >>>>>>> Regards >>>>>>> Dharmendra Kumar Singh >>>>>>> >>>>>> >>>>>> >>>>> >>>> >>> >> >
Written for BaseX 9.0. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery