Re: [docbook-apps] Re: Including a variable in an xlink:href value

2018-01-10 Thread Janice Manwiller
Thanks so much for the suggestion.

I actually tried again to create and refer to an entity file, and this time
it worked and wasn't rejected - I have no idea what I did differently. And
the entity reference in the link destination also works correctly.

Janice

On Wed, Jan 10, 2018 at 8:55 AM, Mark Craig  wrote:

> Hello Janice,
>
> Since you're using Maven, as a workaround you could use bare Maven
> expressions and perform Maven filtering on the source before using the
> docbkx plugin.
>
> Maven filtering replaces expressions like ${project.version} with the
> values of their Maven properties. For example, in a 1.0.0-SNAPSHOT project,
> ${project.version} would be replaced with 1.0.0-SNAPSHOT. Unlike docbkx,
> which works on the XML, Maven filtering works with the files as if they
> were plain text.
>
> In the source, no need to figure out how to embed a processing instruction
> inside an attribute value. Just use the Maven expression. In your example:
> xlink:href="https://mycompany.com/directory/file-name-${
> project.version}.tar.gz"
>
> In the  of your Maven pom.xml:
>
>- Use the Maven resources plugin before docbkx-tools to make a
>filtered copy of your DocBook sources. You can use the
>https://maven.apache.org/plugins/maven-resources-
>plugin/copy-resources-mojo.html
>
> 
>goal to be able to set the output directory, ignore image files, escape
>literal ${...}s in your docs, etc.
>- Configure docbkx-tools to use the filtered sources in the output
>directory of the Maven resources plugin, rather than the original
>(unfiltered) sources.
>
> Hope it helps. Regards,
>
> Mark
>
> On Wed, Jan 10, 2018 at 2:10 PM, Janice Manwiller 
> wrote:
>
>> I probably should clarify that the  notation
>> is specific to the Maven docbkx plugin, which we use to generate the output.
>>
>> I also tried to create an entity file containing a version entity using
>> the info from http://www.sagehill.net/docbookxsl/Db5Entities.html. When
>> I tried to add the DOCTYPE element to refer back to the entity file, Oxygen
>> rejected it as not being well-formed. So I couldn't test whether I could
>> use an entity reference to incorporate the version number in the link
>> target.
>>
>>
>>
>> On Thu, Jan 4, 2018 at 11:14 AM, Janice Manwiller 
>> wrote:
>>
>>> In my docs, I currently use  to indicate to
>>> insert the current product version number into the text.
>>>
>>> I'm adding a link to a URL that includes the version number in the file
>>> name, but if I try to include the version number variable in the link, like:
>>>
>>> xlink:href="https://mycompany.com/directory/file-name->> ${project.version}?>.tar.gz"
>>>
>>> I get an error that the link cannot include the < character.
>>>
>>> Is there any way to include the variable in the link, so that the
>>> version number portion of the URL is populated automatically? Right now I'm
>>> stuck having the link be to the enclosing directory, with the file name
>>> referred to separately:
>>>
>>> file-name-.tar.gz in
>>> https://mycompany.com/directory/;>https://mycomp
>>> any.com/directory/
>>>
>>> Thanks,
>>>
>>> Janice
>>>
>>
>>
>>
>> --
>> Janice Manwiller
>> Principal Technical Writer
>> Sqrrl Data, Inc.
>> www.sqrrl.com | @SqrrlData
>>
>
>


-- 
Janice Manwiller
Principal Technical Writer
Sqrrl Data, Inc.
www.sqrrl.com | @SqrrlData


Re: [docbook-apps] Re: Including a variable in an xlink:href value

2018-01-10 Thread Dave Pawson
Is this a case of the simpler the docbook, the more chance of
understanding what's happening?
Add a 'framework', and as Mark explains you need to understand two
levels of complexity?

I rate docbook as 'hard sums', and fight shy of adding more - though I'm sure
others find it adds its own benefits.

regards

On 10 January 2018 at 13:55, Mark Craig  wrote:
> Hello Janice,
>
> Since you're using Maven, as a workaround you could use bare Maven
> expressions and perform Maven filtering on the source before using the
> docbkx plugin.
>
> Maven filtering replaces expressions like ${project.version} with the values
> of their Maven properties. For example, in a 1.0.0-SNAPSHOT project,
> ${project.version} would be replaced with 1.0.0-SNAPSHOT. Unlike docbkx,
> which works on the XML, Maven filtering works with the files as if they were
> plain text.
>
> In the source, no need to figure out how to embed a processing instruction
> inside an attribute value. Just use the Maven expression. In your example:
> xlink:href="https://mycompany.com/directory/file-name-${project.version}.tar.gz;
>
> In the  of your Maven pom.xml:
>
> Use the Maven resources plugin before docbkx-tools to make a filtered copy
> of your DocBook sources. You can use the
> https://maven.apache.org/plugins/maven-resources-plugin/copy-resources-mojo.html
> goal to be able to set the output directory, ignore image files, escape
> literal ${...}s in your docs, etc.
> Configure docbkx-tools to use the filtered sources in the output directory
> of the Maven resources plugin, rather than the original (unfiltered)
> sources.
>
> Hope it helps. Regards,
>
> Mark
>
>
> On Wed, Jan 10, 2018 at 2:10 PM, Janice Manwiller  wrote:
>>
>> I probably should clarify that the  notation is
>> specific to the Maven docbkx plugin, which we use to generate the output.
>>
>> I also tried to create an entity file containing a version entity using
>> the info from http://www.sagehill.net/docbookxsl/Db5Entities.html. When I
>> tried to add the DOCTYPE element to refer back to the entity file, Oxygen
>> rejected it as not being well-formed. So I couldn't test whether I could use
>> an entity reference to incorporate the version number in the link target.
>>
>>
>>
>> On Thu, Jan 4, 2018 at 11:14 AM, Janice Manwiller 
>> wrote:
>>>
>>> In my docs, I currently use  to indicate to
>>> insert the current product version number into the text.
>>>
>>> I'm adding a link to a URL that includes the version number in the file
>>> name, but if I try to include the version number variable in the link, like:
>>>
>>> xlink:href="https://mycompany.com/directory/file-name->> ${project.version}?>.tar.gz"
>>>
>>> I get an error that the link cannot include the < character.
>>>
>>> Is there any way to include the variable in the link, so that the version
>>> number portion of the URL is populated automatically? Right now I'm stuck
>>> having the link be to the enclosing directory, with the file name referred
>>> to separately:
>>>
>>> file-name-.tar.gz in
>>> >> xlink:href="https://mycompany.com/directory/;>https://mycompany.com/directory/
>>>
>>> Thanks,
>>>
>>> Janice
>>
>>
>>
>>
>> --
>> Janice Manwiller
>> Principal Technical Writer
>> Sqrrl Data, Inc.
>> www.sqrrl.com | @SqrrlData
>
>



-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Re: Including a variable in an xlink:href value

2018-01-10 Thread Mark Craig
Hello Janice,

Since you're using Maven, as a workaround you could use bare Maven
expressions and perform Maven filtering on the source before using the
docbkx plugin.

Maven filtering replaces expressions like ${project.version} with the
values of their Maven properties. For example, in a 1.0.0-SNAPSHOT project,
${project.version} would be replaced with 1.0.0-SNAPSHOT. Unlike docbkx,
which works on the XML, Maven filtering works with the files as if they
were plain text.

In the source, no need to figure out how to embed a processing instruction
inside an attribute value. Just use the Maven expression. In your example:
xlink:href="
https://mycompany.com/directory/file-name-${project.version}.tar.gz;

In the  of your Maven pom.xml:

   - Use the Maven resources plugin before docbkx-tools to make a filtered
   copy of your DocBook sources. You can use the
   
https://maven.apache.org/plugins/maven-resources-plugin/copy-resources-mojo.html
   goal to be able to set the output directory, ignore image files, escape
   literal ${...}s in your docs, etc.
   - Configure docbkx-tools to use the filtered sources in the output
   directory of the Maven resources plugin, rather than the original
   (unfiltered) sources.

Hope it helps. Regards,

Mark

On Wed, Jan 10, 2018 at 2:10 PM, Janice Manwiller  wrote:

> I probably should clarify that the  notation
> is specific to the Maven docbkx plugin, which we use to generate the output.
>
> I also tried to create an entity file containing a version entity using
> the info from http://www.sagehill.net/docbookxsl/Db5Entities.html. When I
> tried to add the DOCTYPE element to refer back to the entity file, Oxygen
> rejected it as not being well-formed. So I couldn't test whether I could
> use an entity reference to incorporate the version number in the link
> target.
>
>
>
> On Thu, Jan 4, 2018 at 11:14 AM, Janice Manwiller 
> wrote:
>
>> In my docs, I currently use  to indicate to
>> insert the current product version number into the text.
>>
>> I'm adding a link to a URL that includes the version number in the file
>> name, but if I try to include the version number variable in the link, like:
>>
>> xlink:href="https://mycompany.com/directory/file-name-> ${project.version}?>.tar.gz"
>>
>> I get an error that the link cannot include the < character.
>>
>> Is there any way to include the variable in the link, so that the version
>> number portion of the URL is populated automatically? Right now I'm stuck
>> having the link be to the enclosing directory, with the file name referred
>> to separately:
>>
>> file-name-.tar.gz in
>> https://mycompany.com/directory/;>https://mycomp
>> any.com/directory/
>>
>> Thanks,
>>
>> Janice
>>
>
>
>
> --
> Janice Manwiller
> Principal Technical Writer
> Sqrrl Data, Inc.
> www.sqrrl.com | @SqrrlData
>


[docbook-apps] Re: Including a variable in an xlink:href value

2018-01-10 Thread Janice Manwiller
I probably should clarify that the  notation is
specific to the Maven docbkx plugin, which we use to generate the output.

I also tried to create an entity file containing a version entity using the
info from http://www.sagehill.net/docbookxsl/Db5Entities.html. When I tried
to add the DOCTYPE element to refer back to the entity file, Oxygen
rejected it as not being well-formed. So I couldn't test whether I could
use an entity reference to incorporate the version number in the link
target.



On Thu, Jan 4, 2018 at 11:14 AM, Janice Manwiller  wrote:

> In my docs, I currently use  to indicate to
> insert the current product version number into the text.
>
> I'm adding a link to a URL that includes the version number in the file
> name, but if I try to include the version number variable in the link, like:
>
> xlink:href="https://mycompany.com/directory/file-name- ${project.version}?>.tar.gz"
>
> I get an error that the link cannot include the < character.
>
> Is there any way to include the variable in the link, so that the version
> number portion of the URL is populated automatically? Right now I'm stuck
> having the link be to the enclosing directory, with the file name referred
> to separately:
>
> file-name-.tar.gz in
> https://mycompany.com/directory/;>https://mycomp
> any.com/directory/
>
> Thanks,
>
> Janice
>



-- 
Janice Manwiller
Principal Technical Writer
Sqrrl Data, Inc.
www.sqrrl.com | @SqrrlData