copying files from sharepoint

Oxygen general issues.
sljohns
Posts: 12
Joined: Wed Mar 01, 2023 5:45 pm

copying files from sharepoint

Post by sljohns »

I have a custom framework for a nonDITA document. The custom framework publishes the xml file to pdf using an xslt transformation. This works perfectly when transformed from a local dir. However, when running the same transform from a file that is in sharepoint, any resources external to the source xml file (for example images) are missing from the output pdf.
When transforming to an fo file, the reference to the image file is present, but the image file itself is not there.
So I created an ANT transform to copy the appropriate resources. However, I cannot find the correct variable to get the appropriate sharepoint path so that all the files and folders from the current file location (sharepoint) are in the appropriate "\\AppData\Local\Temp\OxygenXMLTemp\...". Any help would be appreciated.
Radu
Posts: 9115
Joined: Fri Jul 09, 2004 5:18 pm

Re: copying files from sharepoint

Post by Radu »

Hi,

Are you connecting using Sharepoint online or the older Sharepoint connector?
https://www.oxygenxml.com/doc/versions/ ... ction.html
When transforming to an fo file, the reference to the image file is present, but the image file itself is not there.
So the XML file is on Sharepoint, the intermediary XSL-FO file will be on the local disk meaning that it should be created so that it has absolute URL references to the other image resources from Sharepoint. But this might not work as Sharepoint is not a plain web site, it has various authentication details which need to be filled out in order to access resources from it.
So I created an ANT transform to copy the appropriate resources. However, I cannot find the correct variable to get the appropriate sharepoint path so that all the files and folders from the current file location (sharepoint) are in the appropriate "\\AppData\Local\Temp\OxygenXMLTemp\...". Any help would be appreciated.
I'm not sure how that could work. Sometimes there are ANT tasks to connect ANT build files for example to FTP servers: https://ant.apache.org/manual/Tasks/ftp.html
But I do not know of an ANT task for connecting to a Sharepoint site.

How about if you map the Sharepoint site to a local disk drive so that Oxygen considers it's just a local folder?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Garrett_3
Posts: 9
Joined: Fri Feb 12, 2021 8:46 pm

Re: copying files from sharepoint

Post by Garrett_3 »

sljohns – Did you figure out a solution to this? I would love to use SharePoint as a CMS, but there's no point if you can't publish files because of it.

Radu – Would it be possible to "save a copy" of your XML to a temp directory in the transformation scenario somehow?

Garrett
Last edited by Garrett_3 on Thu Apr 18, 2024 5:44 pm, edited 1 time in total.
Garrett
im_rem
Posts: 21
Joined: Tue Jun 14, 2022 1:08 pm

Re: copying files from sharepoint

Post by im_rem »

Garrett_3 wrote: Thu Apr 18, 2024 5:39 pm Radu – Would it be possible to "save a copy" of your XML to a temp directory in the transformation scenario somehow?
Garrett
I would also like to suggest it as a new feature. We use Sharepoint mostly for files coming from product managers and developers, while the DITA documentation is managed in a GIT repo. But there are some files that developers would like to share in the Internal Knowledge Base. So for this such a feature would be handy.
As an alternative, I will ask ChatGPT to write me a script that downloads required files weekly into a subfolder in my DITA project folder.
Radu
Posts: 9115
Joined: Fri Jul 09, 2004 5:18 pm

Re: copying files from sharepoint

Post by Radu »

Hi,
Not sure how I can help here. Maybe you can search for some sort of Sharepoint/Git integration or as you said, have a script which updates the Git project daily with the contents from Sharepoint. Ideally the publishing engine should have all necessary resources available on the local disk.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply