can maven-docbkx-plugin fail if it can't find a linkend?

21 views
Skip to first unread message

natk

unread,
Sep 29, 2014, 1:56:15 AM9/29/14
to docbkx-to...@googlegroups.com
I would like my build to fail if any of the linkends or olink target destinations are missing. Does anyone know if this is possible?

e.g. if I get the following error that the plugin will fail:

Error: no ID for constraint linkend: linkendtext.


Perhaps this is more a maven question than a docbkx one but I haven't been able to find any general maven config to do this.

Nat 

Mark Craig

unread,
Sep 29, 2014, 2:09:59 AM9/29/14
to docbkx-to...@googlegroups.com
Hello,

Not sure about xref linkend attributes. I've not looked into it because we generally write in an IDE (like IntelliJ IDEA or Eclipse), where bad linkend values show up as an error right in the editor.

For olinks and regular external links we are using a separate plugin, https://github.com/aldaris/docbook-linktester.

Regards,
Mark

--
You received this message because you are subscribed to the Google Groups "Docbkx Tools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to docbkx-tools-us...@googlegroups.com.
To post to this group, send email to docbkx-to...@googlegroups.com.
Visit this group at http://groups.google.com/group/docbkx-tools-users.
For more options, visit https://groups.google.com/d/optout.

Nat

unread,
Oct 7, 2014, 7:44:54 PM10/7/14
to docbkx-to...@googlegroups.com
Thanks for that.

Do you use an IDE plugin (I use IntelliJ) to make the links show up as an error? 

Nat 


On Monday, September 29, 2014 4:09:59 PM UTC+10, Mark Craig wrote:
Hello,

Not sure about xref linkend attributes. I've not looked into it because we generally write in an IDE (like IntelliJ IDEA or Eclipse), where bad linkend values show up as an error right in the editor.

For olinks and regular external links we are using a separate plugin, https://github.com/aldaris/docbook-linktester.

Regards,
Mark
On Mon, Sep 29, 2014 at 7:56 AM, natk <nker...@gmail.com> wrote:
I would like my build to fail if any of the linkends or olink target destinations are missing. Does anyone know if this is possible?

e.g. if I get the following error that the plugin will fail:

Error: no ID for constraint linkend: linkendtext.


Perhaps this is more a maven question than a docbkx one but I haven't been able to find any general maven config to do this.

Nat 

--
You received this message because you are subscribed to the Google Groups "Docbkx Tools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to docbkx-tools-users+unsub...@googlegroups.com.

Mark Craig

unread,
Oct 8, 2014, 2:18:57 AM10/8/14
to docbkx-to...@googlegroups.com
Hi Nat,

A plugin for IntelliJ IDEA would be better than running a separate goal after the fact.
I haven't looked into it, though.

Regards,
Mark

To unsubscribe from this group and stop receiving emails from it, send an email to docbkx-tools-us...@googlegroups.com.

Nat

unread,
Oct 8, 2014, 2:41:45 AM10/8/14
to docbkx-to...@googlegroups.com
Sorry, I meant a plugin to show the bad linkend values. Mine do not show up in IntelliJ. Do you use a plugin for this? What version of the IDE are you using?


On Wednesday, October 8, 2014 5:18:57 PM UTC+11, Mark Craig wrote:
Hi Nat,

A plugin for IntelliJ IDEA would be better than running a separate goal after the fact.
I haven't looked into it, though.

Regards,
Mark
On Wed, Oct 8, 2014 at 1:44 AM, Nat <nker...@gmail.com> wrote:
Thanks for that.

Do you use an IDE plugin (I use IntelliJ) to make the links show up as an error? 

Nat 

On Monday, September 29, 2014 4:09:59 PM UTC+10, Mark Craig wrote:
Hello,

Not sure about xref linkend attributes. I've not looked into it because we generally write in an IDE (like IntelliJ IDEA or Eclipse), where bad linkend values show up as an error right in the editor.

For olinks and regular external links we are using a separate plugin, https://github.com/aldaris/docbook-linktester.

Regards,
Mark
On Mon, Sep 29, 2014 at 7:56 AM, natk <nker...@gmail.com> wrote:
I would like my build to fail if any of the linkends or olink target destinations are missing. Does anyone know if this is possible?

e.g. if I get the following error that the plugin will fail:

Error: no ID for constraint linkend: linkendtext.


Perhaps this is more a maven question than a docbkx one but I haven't been able to find any general maven config to do this.

Nat 

--
You received this message because you are subscribed to the Google Groups "Docbkx Tools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to docbkx-tools-users+unsubscribe@googlegroups.com.
To post to this group, send email to docbkx-to...@googlegroups.com.
Visit this group at http://groups.google.com/group/docbkx-tools-users.
For more options, visit https://groups.google.com/d/optout.

Mark Craig

unread,
Oct 8, 2014, 2:53:02 AM10/8/14
to docbkx-to...@googlegroups.com
That’s funny, I’ve not added any plugins for this AFAIK. I’m using IntelliJ IDEA community edition 13.1.5 on Mac OS X.

When I type in a bad linkend attribute value, I get red text and red markers down the right side of the IDE window. Mousing over the red text displays an “Invalid id reference” in the status bar.

Mark



To unsubscribe from this group and stop receiving emails from it, send an email to docbkx-tools-us...@googlegroups.com.

Mark Craig

unread,
Oct 8, 2014, 2:57:03 AM10/8/14
to docbkx-to...@googlegroups.com
My guess was that IntelliJ learns what a linkend value is supposed to be from http://docbook.org/xml/5.0/xsd/docbook.xsd:

<xs:attribute name="linkend" type="xs:IDREF"/>

And so it knows to check xml:id values for a match.

But that’s just a guess.

Mark

On 08 Oct 2014, at 08:52, Mark Craig <mark....@gmail.com> wrote:

That’s funny, I’ve not added any plugins for this AFAIK. I’m using IntelliJ IDEA community edition 13.1.5 on Mac OS X.

When I type in a bad linkend attribute value, I get red text and red markers down the right side of the IDE window. Mousing over the red text displays an “Invalid id reference” in the status bar.

Mark

<bad-linkend.png>

Nat

unread,
Oct 15, 2014, 1:05:43 AM10/15/14
to docbkx-to...@googlegroups.com
Interesting. I don't get the error highlighted. I am using IntelliJ professional edition 13.1.4 on max os x 10.9.4.

Maybe it is something to do with the project structure?
<bad-linkend.png>

To unsubscribe from this group and stop receiving emails from it, send an email to docbkx-tools-users+unsubscribe...@googlegroups.com.
To post to this group, send email to docbkx-to...@googlegroups.com.
Visit this group at http://groups.google.com/group/docbkx-tools-users.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Docbkx Tools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to docbkx-tools-users+unsub...@googlegroups.com.
To post to this group, send email to docbkx-to...@googlegroups.com.
Visit this group at http://groups.google.com/group/docbkx-tools-users.
For more options, visit https://groups.google.com/d/optout.

Nat

unread,
Oct 15, 2014, 1:27:26 AM10/15/14
to docbkx-to...@googlegroups.com
Did you have to add anything to the Project Settings to configure the schema?

Mark Craig

unread,
Oct 15, 2014, 2:04:19 AM10/15/14
to docbkx-to...@googlegroups.com
As far as I can tell, the only thing I've done was to have IntelliJ IDEA download and cache the XSD, as shown in the attached view of the global Schema and DTDs preferences.

Inline image 1

To unsubscribe from this group and stop receiving emails from it, send an email to docbkx-tools-us...@googlegroups.com.

natk

unread,
Oct 15, 2014, 4:15:28 AM10/15/14
to docbkx-to...@googlegroups.com
Ah, that's probably it. Will give that a go. I wonder why you have do that explicitly when it has the full path there. For offline work I guess.

On 15/10/2014, at 5:04 pm, Mark Craig <mark....@gmail.com> wrote:

As far as I can tell, the only thing I've done was to have IntelliJ IDEA download and cache the XSD, as shown in the attached view of the global Schema and DTDs preferences.

<preferences.png>
You received this message because you are subscribed to a topic in the Google Groups "Docbkx Tools Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/docbkx-tools-users/DRk8yJq5NZY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to docbkx-tools-us...@googlegroups.com.

natk

unread,
Oct 19, 2014, 8:49:24 PM10/19/14
to docbkx-to...@googlegroups.com
Yes, that was it. Thanks very much for your help.
Reply all
Reply to author
Forward
0 new messages