[oXygen-user] Default folder for images

Wendell Piez wapiez at wendellpiez.com
Thu Dec 19 10:08:22 CST 2013


Hi,

I agree with Mark that one approach is to implement a completely
different policy with respect to the link management, and work around
the problem that way.

On the other hand I'm also sympathetic with the requirement, which
indeed is very general, not just a matter of your links.

I think I'd prefer the XSLT route. Radu points out that you lose the
DOCTYPE declaration and that you gain (what might be) unwanted
assignment of default values to attributes from your DTD.

However:

1. While an XSLT cannot ordinarily or properly retain a DOCTYPE
declaration, it can assign one to the serialized results using
xsl:output, and this is often just as good or better.

2. Similarly, a near-identity transformation can be configured to
remove attributes from the results when their values correspond to
default values assigned elsewhere.

Writing this stylesheet does entail some homework (DTD analysis to
find your attribute defaults), and potentially maintenance to keep it
in alignment with your schema(s) and policies. For example, you may
need to address your requirements for the use of parsed entities and
whether these can also be kept (or rather, remade) the way you want
them.

However, a near-identity transformation that would normalize a
document along these lines could be imported into another XSLT to
perform whatever surgery you needed on its tagging (in this case or in
later cases). As such, it would be a valuable resource to have in your
toolkit.

For example, it can also serve as the basis of an XSLT for whitespace
normalization and cleanup, a task that raises the same issues.

Cheers, Wendell

Wendell Piez | http://www.wendellpiez.com
XML | XSLT | electronic publishing
Eat Your Vegetables
_____oo_________o_o___ooooo____ooooooo_^


On Thu, Dec 19, 2013 at 3:59 AM, Oxygen XML Editor Support
<support at oxygenxml.com> wrote:
> Hi Nathan,
>
> I answered you here:
>
> http://www.oxygenxml.com/forum/viewtopic.php?f=19&t=10351&p=29017#p29017
>
> But if anybody else has a better idea, possibly without using our Java
> API, please contribute.
> Applying an XSLT stylesheet to make changes is an idea but it removed
> the DOCTYPE declaration and also adds default attributes to the
> processed XML content.
>
> Regards,
> Radu
>
> Radu Coravu
> <oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
> http://www.oxygenxml.com
>
> On 12/19/2013 1:20 AM, Nathan wrote:
>> Hi,
>>    I am currently moving from Arbortext to Oxygen and I have a bunch of
>> DITA XMLs which have a fixed path for img src attributes (Arbortext
>> allows one to set such folder locations in the preferences for inline
>> display). These paths are not valid (what can I say, I used Arbortext
>> ;-)) and I am trying to move away from this practice by converting it in
>> to relative paths.
>>    In the meantime, is there any thing I can do to make this valid. I
>> have looked at some options including:
>>
>>   * Change path using the ChangeAttribute Author default operation
>>     (Question, is there any the operation can be triggered on document
>>     open in OxygenXML Author).
>>   * Using the Java API (Again, any way this trigger this on document open)
>>
>> Is there a better way to do this?
>>
>> Thanks!
>> Nathan
>>
>> PS: I am using Oxygen 15
>>
>>
>> _______________________________________________
>> oXygen-user mailing list
>> oXygen-user at oxygenxml.com
>> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>>
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user


More information about the oXygen-user mailing list