Login  Register

xml does not validate

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

xml does not validate

  <row> 
<entry> 
<simpara><anchor xml:id="1" xreflabel="[1]"/>[1]</simpara> 
</entry> 
<entry>

in addition, and contrary to `-bdocbook45' I get complaints regarding missing entities such as Greek letters and special symbols...

I don't know anything about valid xml/docbook syntax so I can't say what's going wrong here ... what am I missing?

thx,joerg
jvdh
when trying to convert 'asiidoctor' generated xml to pdf via dblatex I see the following error messages.

with '-b docbook45':

"... does not validate (status 3).
element xref: validity error : Syntax of value for attribute linkend of xref is not valid"
the incriminated part of the xml source reads:

<simpara>Referenzen: <xref linkend="1"/>, <xref linkend="2"/></simpara> 




with '-b docbook':

"... does not validate (status1).
validity error : xml:id : attribute value 1 is not an NCName
<simpara><anchor xml:id="1" xreflabel="[1]"/>[1]</simpara>"

the incriminated part of the xml source reads:

<bridgehead renderas="sect1">References</bridgehead>
<informaltable tabstyle="horizontal" frame="none" colsep="0" rowsep="0">
<tgroup cols="2">
<colspec colwidth="15*"/>
<colspec colwidth="85*"/>
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: xml does not validate

mojavelinux
Administrator
Could you please share the relevant bit of AsciiDoc source that produced this output so that we can better help you?

Thanks,

-Dan

On Sun, May 24, 2015 at 4:57 AM, jvdh [via Asciidoctor :: Discussion] <[hidden email]> wrote:
when trying to convert 'asiidoctor' generated xml to pdf via dblatex I see the following error messages.

with '-b docbook45':

"... does not validate (status 3).
element xref: validity error : Syntax of value for attribute linkend of xref is not valid"
the incriminated part of the xml source reads:

<simpara>Referenzen: <xref linkend="1"/>, <xref linkend="2"/></simpara> 




with '-b docbook':

"... does not validate (status1).
validity error : xml:id : attribute value 1 is not an NCName
<simpara><anchor xml:id="1" xreflabel="[1]"/>[1]</simpara>"

the incriminated part of the xml source reads:

<bridgehead renderas="sect1">References</bridgehead>
<informaltable tabstyle="horizontal" frame="none" colsep="0" rowsep="0">
<tgroup cols="2">
<colspec colwidth="15*"/>
<colspec colwidth="85*"/>
  <row> 
<entry> 
<simpara><anchor xml:id="1" xreflabel="[1]"/>[1]</simpara> 
</entry> 
<entry>

in addition, and contrary to `-bdocbook45' I get complaints regarding missing entities such as Greek letters and special symbols...

I don't know anything about valid xml/docbook syntax so I can't say what's going wrong here ... what am I missing?

thx,joerg



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/xml-does-not-validate-tp3253.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: xml does not validate

jvdh
On Sun, 24 May 2015 22:27:13 +0200, mojavelinux [via Asciidoctor ::  
Discussion] <[hidden email]> wrote:

>
>
> Could you please share the relevant bit of AsciiDoc source that produced
> this output so that we can better help you?

sure. this should be a (more or less) minimal example:

//---------------------------------------------------------
= some title

some text

some text <<1>> some more

[float]
== References
[horizontal]

[[[1]]]::
first
//---------------------------------------------------------

putting this in `tt.txt' and executing, e.g.,

asciidoctor -b docbook tt.txt
xmlto pdf --with-dblatex tt.xml

should show the problem (similar with `-b docbook45'). at least it does  
for me with

Asciidoctor 1.5.2 [http://asciidoctor.org]
Runtime Environment (ruby 2.0.0p481 (2014-05-08 revision 45883)  
[universal.x86_64-darwin14]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)

xmlto version 0.0.25

dblatex version 0.3.5

under macos 10.10.3



thanks

joerg


>
> Thanks,
>
> -Dan
>
> On Sun, May 24, 2015 at 4:57 AM, jvdh [via Asciidoctor :: Discussion] <
> [hidden email]> wrote:
>
>> when trying to convert 'asiidoctor' generated xml to pdf via dblatex I  
>> see
>> the following error messages.
>>
>> with '-b docbook45':
>>
>> "... does not validate (status 3).
>> element xref: validity error : Syntax of value for attribute linkend of
>> xref is not valid"
>> the incriminated part of the xml source reads:
>>
>> <simpara>Referenzen: <xref linkend="1"/>, <xref linkend="2"/></simpara>
>>
>>
>>
>>
>> with '-b docbook':
>>
>> "... does not validate (status1).
>> validity error : xml:id : attribute value 1 is not an NCName
>> <simpara><anchor xml:id="1" xreflabel="[1]"/>[1]</simpara>"
>>
>> the incriminated part of the xml source reads:
>>
>> <bridgehead renderas="sect1">References</bridgehead>
>> <informaltable tabstyle="horizontal" frame="none" colsep="0" rowsep="0">
>> <tgroup cols="2">
>> <colspec colwidth="15*"/>
>> <colspec colwidth="85*"/>
>>   <row>
>> <entry>
>> <simpara><anchor xml:id="1" xreflabel="[1]"/>[1]</simpara>
>> </entry>
>> <entry>
>>
>> in addition, and contrary to `-bdocbook45' I get complaints regarding
>> missing entities such as Greek letters and special symbols...
>>
>> I don't know anything about valid xml/docbook syntax so I can't say  
>> what's
>> going wrong here ... what am I missing?
>>
>> thx,joerg
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the  
>> discussion
>> below:
>> http://discuss.asciidoctor.org/xml-does-not-validate-tp3253.html
>>  To start a new topic under Asciidoctor :: Discussion, email
>> [hidden email]
>> To unsubscribe from Asciidoctor :: Discussion, click here
>> <
>> .
>> NAML
>> <
http://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>


--
Using Opera's revolutionary email client: http://www.opera.com/mail/
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: xml does not validate

mojavelinux
Administrator
joerg,

Thanks.

Just as I had suspected (but I needed to see to verify), a number is not a valid id character. The id value must conform to the XML id syntax. Basically, it must start with a letter or underscore and have only character values after that. (HTML 5 is more loose, but to use the FOP or LaTeX toolchains, you have to stick to this).

If you want to change the label that appears, you can do that using:

<<ref-1,1>>

Then,

[[ref-1]]
first

Does that work for you?

-Dan

On Sun, May 24, 2015 at 3:13 PM, jvdh [via Asciidoctor :: Discussion] <[hidden email]> wrote:
On Sun, 24 May 2015 22:27:13 +0200, mojavelinux [via Asciidoctor ::  
Discussion] <[hidden email]> wrote:

>
>
> Could you please share the relevant bit of AsciiDoc source that produced
> this output so that we can better help you?

sure. this should be a (more or less) minimal example:

//---------------------------------------------------------
= some title

some text

some text <<1>> some more

[float]
== References
[horizontal]

[[[1]]]::
first
//---------------------------------------------------------

putting this in `tt.txt' and executing, e.g.,

asciidoctor -b docbook tt.txt
xmlto pdf --with-dblatex tt.xml

should show the problem (similar with `-b docbook45'). at least it does  
for me with

Asciidoctor 1.5.2 [http://asciidoctor.org]
Runtime Environment (ruby 2.0.0p481 (2014-05-08 revision 45883)  
[universal.x86_64-darwin14]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)

xmlto version 0.0.25

dblatex version 0.3.5

under macos 10.10.3



thanks

joerg


>
> Thanks,
>
> -Dan
>
> On Sun, May 24, 2015 at 4:57 AM, jvdh [via Asciidoctor :: Discussion] <
> [hidden email]> wrote:

>
>> when trying to convert 'asiidoctor' generated xml to pdf via dblatex I  
>> see
>> the following error messages.
>>
>> with '-b docbook45':
>>
>> "... does not validate (status 3).
>> element xref: validity error : Syntax of value for attribute linkend of
>> xref is not valid"
>> the incriminated part of the xml source reads:
>>
>> <simpara>Referenzen: <xref linkend="1"/>, <xref linkend="2"/></simpara>
>>
>>
>>
>>
>> with '-b docbook':
>>
>> "... does not validate (status1).
>> validity error : xml:id : attribute value 1 is not an NCName
>> <simpara><anchor xml:id="1" xreflabel="[1]"/>[1]</simpara>"
>>
>> the incriminated part of the xml source reads:
>>
>> <bridgehead renderas="sect1">References</bridgehead>
>> <informaltable tabstyle="horizontal" frame="none" colsep="0" rowsep="0">
>> <tgroup cols="2">
>> <colspec colwidth="15*"/>
>> <colspec colwidth="85*"/>
>>   <row>
>> <entry>
>> <simpara><anchor xml:id="1" xreflabel="[1]"/>[1]</simpara>
>> </entry>
>> <entry>
>>
>> in addition, and contrary to `-bdocbook45' I get complaints regarding
>> missing entities such as Greek letters and special symbols...
>>
>> I don't know anything about valid xml/docbook syntax so I can't say  
>> what's
>> going wrong here ... what am I missing?
>>
>> thx,joerg
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the  
>> discussion
>> below:
>> http://discuss.asciidoctor.org/xml-does-not-validate-tp3253.html
>>  To start a new topic under Asciidoctor :: Discussion, email
>> [hidden email]
>> To unsubscribe from Asciidoctor :: Discussion, click here
>> <

>> .
>> NAML
>> <
http://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>


--
Using Opera's revolutionary email client: http://www.opera.com/mail/



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/xml-does-not-validate-tp3253p3261.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: xml does not validate

jvdh
On Mon, 25 May 2015 00:33:34 +0200, mojavelinux [via Asciidoctor ::  
Discussion] <[hidden email]> wrote:

>
>
> joerg,
>

dan,

> Thanks.
>

well, thank _you_ for bothering ..

> Just as I had suspected (but I needed to see to verify), a number is not  
> a
> valid id character. The id value must conform to the XML id syntax.
> Basically, it must start with a letter or underscore and have only
> character values after that. (HTML 5 is more loose, but to use the FOP or
> LaTeX toolchains, you have to stick to this).

I see. as I said I don't know anything of xml/docbook, but just want to  
get my AsciiDoc document to html and pdf ...

>
> If you want to change the label that appears, you can do that using:
>
> <<ref-1,1>>
>
> Then,
>
> [[ref-1]]
> first
>
> Does that work for you?

only to the extent that the <<...>> appears as desired in the text but the  
[[...]] anchor (of course...) reads `ref-1'. but in my case I actually use  
the anchor as a bibliographic reference and the <<..>> link is citing it  
in the text. so I really want numerical values (as an alternative to  
"miller1998" or whatever) at both places. actually, the whole setup I use  
tries to circumvent assorted problems which I had with `asciidoc'  
bibliographies (don't recall exactly what they were, but the main one, I  
believe, was that I ended up with references numbered _twice_ in the  
dblatex pdf output). so I do a translation of the symbolic links and  
anchor labels to numbers by a script myself and only then feed it to  
asciidoc(tor). I understand now, that this generates invalid xml but for  
the time being I will use the `--skip-validation' flag of `xmlto' (or the  
corresponding one for `dblatex') to get the desired output nevertheless  
;-).

but what would be a better (or the best) way to achieve this in  
asciidoctor? i.e. having an input such as

//--------------------------------------------
please see the references <<miller1998>> and <<jones 2014>> for further  
information.

some more text


==References
[[[miller1998]]]:: miller et al in some journal
[[[jones2014]]]:: jones in some other journal
//--------------------------------------------

producing html _and_(!) pdf output that reads

#---------------------------------------------
please see the references (1) and (2) for further information.

some more text


==References
[1] miller et al in some journal
[2] jones in some other journal
#---------------------------------------------

_and_ is correctly hyperlinked.

(where, ideally it should be user-configurable, which type of parenthesis  
to use (i.e. (1) vs. [1] for the links/citations) and whether the  
references section is enumerated by `1.' or by `[1]' or whatever style is  
preferred, but this is of course a secondary issue).

regards,
joerg




>
> -Dan
>
> On Sun, May 24, 2015 at 3:13 PM, jvdh [via Asciidoctor :: Discussion] <
> [hidden email]> wrote:
>
>> On Sun, 24 May 2015 22:27:13 +0200, mojavelinux [via Asciidoctor ::
>> Discussion] <[hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=3261&i=0>> wrote:
>>
>> >
>> >
>> > Could you please share the relevant bit of AsciiDoc source that  
>> produced
>> > this output so that we can better help you?
>>
>> sure. this should be a (more or less) minimal example:
>>
>> //---------------------------------------------------------
>> = some title
>>
>> some text
>>
>> some text <<1>> some more
>>
>> [float]
>> == References
>> [horizontal]
>>
>> [[[1]]]::
>> first
>> //---------------------------------------------------------
>>
>> putting this in `tt.txt' and executing, e.g.,
>>
>> asciidoctor -b docbook tt.txt
>> xmlto pdf --with-dblatex tt.xml
>>
>> should show the problem (similar with `-b docbook45'). at least it does
>> for me with
>>
>> Asciidoctor 1.5.2 [http://asciidoctor.org]
>> Runtime Environment (ruby 2.0.0p481 (2014-05-08 revision 45883)
>> [universal.x86_64-darwin14]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)
>>
>> xmlto version 0.0.25
>>
>> dblatex version 0.3.5
>>
>> under macos 10.10.3
>>
>>
>>
>> thanks
>>
>> joerg
>>
>>
>> >
>> > Thanks,
>> >
>> > -Dan
>> >
>> > On Sun, May 24, 2015 at 4:57 AM, jvdh [via Asciidoctor :: Discussion]  
>> <
>> > [hidden email] <http:///user/SendEmail.jtp?type=node&node=3261&i=1>>
>> wrote:
>> >
>> >> when trying to convert 'asiidoctor' generated xml to pdf via dblatex  
>> I
>>
>> >> see
>> >> the following error messages.
>> >>
>> >> with '-b docbook45':
>> >>
>> >> "... does not validate (status 3).
>> >> element xref: validity error : Syntax of value for attribute linkend  
>> of
>> >> xref is not valid"
>> >> the incriminated part of the xml source reads:
>> >>
>> >> <simpara>Referenzen: <xref linkend="1"/>, <xref  
>> linkend="2"/></simpara>
>> >>
>> >>
>> >>
>> >>
>> >> with '-b docbook':
>> >>
>> >> "... does not validate (status1).
>> >> validity error : xml:id : attribute value 1 is not an NCName
>> >> <simpara><anchor xml:id="1" xreflabel="[1]"/>[1]</simpara>"
>> >>
>> >> the incriminated part of the xml source reads:
>> >>
>> >> <bridgehead renderas="sect1">References</bridgehead>
>> >> <informaltable tabstyle="horizontal" frame="none" colsep="0"
>> rowsep="0">
>> >> <tgroup cols="2">
>> >> <colspec colwidth="15*"/>
>> >> <colspec colwidth="85*"/>
>> >>   <row>
>> >> <entry>
>> >> <simpara><anchor xml:id="1" xreflabel="[1]"/>[1]</simpara>
>> >> </entry>
>> >> <entry>
>> >>
>> >> in addition, and contrary to `-bdocbook45' I get complaints regarding
>> >> missing entities such as Greek letters and special symbols...
>> >>
>> >> I don't know anything about valid xml/docbook syntax so I can't say
>> >> what's
>> >> going wrong here ... what am I missing?
>> >>
>> >> thx,joerg
>> >>
>> >>
>> >> ------------------------------
>> >>  If you reply to this email, your message will be added to the
>> >> discussion
>> >> below:
>> >> http://discuss.asciidoctor.org/xml-does-not-validate-tp3253.html
>> >>  To start a new topic under Asciidoctor :: Discussion, email
>> >> [hidden email] <http:///user/SendEmail.jtp?type=node&node=3261&i=2>
>> >> To unsubscribe from Asciidoctor :: Discussion, click here
>> >> <
>> >> .
>> >> NAML
>> >> <
>> http://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>> >>
>> >
>> >
>> >
>>
>>
>> --
>> Using Opera's revolutionary email client: http://www.opera.com/mail/
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the  
>> discussion
>> below:
>> http://discuss.asciidoctor.org/xml-does-not-validate-tp3253p3261.html
>>  To start a new topic under Asciidoctor :: Discussion, email
>> [hidden email]
>> To unsubscribe from Asciidoctor :: Discussion, click here
>> <
>> .
>> NAML
>> <
http://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>


--
Using Opera's revolutionary email client: http://www.opera.com/mail/