Default folder for images

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

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@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

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@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@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Hi, Wendell's suggestion should not be too hard in this case, as you mention you use DITA. 1. there are no entities 2. the default attributes are only @class and @domains 3. if you have the topics, tasks, references, etc. in different folders then you may apply the right stylesheet for each folder, generating the corresponding DOCTYPE declaration In the not so distant future, once DITA 1.3 is available, you should be able to use Relax NG with DITA and thus you will not have the DOCTYPE issue anymore. One possibility for handling 3 is to generate the output in a different place - and that is even a better practice because you can then compare the two folders. In this case then you can generate the DOCTYPE declaration based on the root element name, for example: <xsl:template match="/"> <xsl:result-document href="test2.xml" doctype-system="{local-name(/*[1])}.dtd"> <xsl:copy-of select="."/> </xsl:result-document> </xsl:template> will generate <!DOCTYPE dita SYSTEM "dita.dtd"> if applied in a document with the root element "dita". Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 12/19/13, 6:08 PM, Wendell Piez wrote:
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@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@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
participants (4)
-
George Cristian Bina
-
Nathan
-
Oxygen XML Editor Support
-
Wendell Piez