Using SharePoint document ID to reference files

Post here questions and problems related to oXygen frameworks/document types.
Rodrik
Posts: 30
Joined: Mon Jan 27, 2014 11:19 am

Using SharePoint document ID to reference files

Post by Rodrik » Thu Mar 06, 2014 5:43 pm

Would it be possible (and feasible) to use URLs referencing SharePoint's document ID (of the form https://mycompany.com/MyDITALibrary/_la ... EJK-59-405) instead of usual filename-based URL?

It strikes me that if this were possible, it would mean that files could be moved around and renamed in the SharePoint library without breaking references to them.

Regards

Rodrik

adrian
Posts: 2580
Joined: Tue May 17, 2005 4:01 pm

Re: Using SharePoint document ID to reference files

Post by adrian » Thu Mar 06, 2014 6:25 pm

Hi,

What type of documents do you keep on SharePoint (DITA, DockBook, other)?
In theory that would be possible, but note that it also means you will bind them to that server/library and they will be difficult to export/move from there.
Make sure you use a clean URL that points to an ID:

Code: Select all

http://<Server_Name>/_layouts/DocIdRedir.aspx?ID=<Document_ID>
The one you provided was very library and layout specific, so that may break after moving it.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Rodrik
Posts: 30
Joined: Mon Jan 27, 2014 11:19 am

Re: Using SharePoint document ID to reference files

Post by Rodrik » Fri Mar 07, 2014 4:28 pm

Thank you Adrian.

I have in mind DITA files. I take your point about the disadvantage of binding the files to the library. I did try out your suggestion but with no luck.

I used the following map:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map>
<title>Test map - using SharePoint ID</title>
<topicref href="https://<server_name>/_layouts/15/DocIdRedir.aspx?ID=ABCDEFG-59-563" format="dita"/>
</map>
Although Oxygen is able to resolve the topic title in the DITA Maps Manager, when I run the PDF transformation an error is returned:

[DOTX008E] File 'C:\Users\rodrik\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\PYEIUN0J\temp\pdf\https:\<server_name>\_layouts\15\DocIdRedir.aspx?ID=ABCDEFG-59-563' does not exist or cannot be loaded.

Regards

Rodrik

Radu
Posts: 6587
Joined: Fri Jul 09, 2004 5:18 pm

Re: Using SharePoint document ID to reference files

Post by Radu » Mon Mar 10, 2014 3:47 pm

Hi Rodrik,

How exactly are you producing the PDF from the DITA content?
Are you using Oxygen or are you doing this on the server side? Do you have a CMS which is installed on the server side and works over the Sharepoint installation there?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Rodrik
Posts: 30
Joined: Mon Jan 27, 2014 11:19 am

Re: Using SharePoint document ID to reference files

Post by Rodrik » Mon Mar 10, 2014 5:55 pm

Hi Radu

For this test I simply generated a PDF using the Oxygen XML Author's Apply Transformation Scenario(s) (using the default DITA Map PDF scenario). The map and referenced topic are stored in a SharePoint 2013 library and I opened the map in XML Author using the Open URL option. There is no other CMS. I should point out that there is absolutely no problem generating output from a map that uses standard references to SharePoint resource, such as the following:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map>
<title>Implementation Guide</title>
<topicref href="fd2b1d06-1535-40dc-b4dd-770d2c192fa2.dita"/>
</map>
Regards
Rodrik

Radu
Posts: 6587
Joined: Fri Jul 09, 2004 5:18 pm

Re: Using SharePoint document ID to reference files

Post by Radu » Tue Mar 11, 2014 3:38 pm

Hi Rodrik,

We are having trouble replicating this issue on our side, we enabled the
Document ID Service
but still cannot make the "Document ID" column appear on the resources view, we'll try further.

Anyway, the error you obtained:
[DOTX008E] File 'C:\Users\rodrik\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\PYEIUN0J\temp\pdf\https:\<server_name>\_layouts\15\DocIdRedir.aspx?ID=ABCDEFG-59-563' does not exist or cannot be loaded.
is quite strange, are you sure you open the DITA Map from Oxygen (using the Open URL action or the Data Source Explorer with a configured connection)? Because the file path seems to lead to the Internet Explorer's local temporary files cache, as if you clicked on the DITA Map in Internet Explorer and chose to open it with Oxygen, case in which the DITA Map is brought to the local file system in the Internet Explorer Temporary Files folder.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply