I have a page in Confluence where I want to show XML content with an XSLT Style-Sheet.
The XML and XSLT are attached to the same page.
When I open the page it downloads the file instead of showing the content
I reckon I cannot use the "/download/" URL, but do not know which is correct.
*Note*
I cannot use any Plugin as we have a strict policy.
Is there any reason why you can't use the Code Snippet macro set up for XML?
On a more general note, the iframe macro requires the view-only URL that points directly to what you want to display.
For example,
I'd scout around the tool that has your content (that you want to embed in the iframe) for a suitable link.
{quote}
Is there any reason why you can't use the Code Snippet macro set up for XML?
{quote}
Yes, we're not allowed for *any* plugin, resp. 0 Budget. None at all.
{quote}
the iframe macro requires the view-only URL
{quote}
This is what I thought but what is the view-only URL for Attachments on Confluence?
I tried several attempts and googled for it, but cannot find the URL syntax of Confluence attachments for that purpose.
I also tried
<iframe width="1024" height="800" type="application/xml" src="/Notes.xml" xslt="/notes.xslt"></iframe>
like, with / only, but it seems it does not get recognized.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Code snipet macro is included in Confluence. It's a native Confluence feature and doesn't cost anything.
In editor, type / , then start typing Code... then copy / paste the code into the code snippet window. it will look like this.
Tip: if the code is too long, you can put the code block into an Expand macro (again, a native Confluence feature) That way the page will remain reasonably long when opened for reading and users will be able to expand the section with the code to review or copy it.
------------------
You can also just drag and drop the XML file onto a page in the editor. THen it works like this:
No extra plugin needed.
As for iframe, it needs to be a full URL if your file is outside of Confluence.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh, that "Code" you mean. Yes I am aware of that, but I need to paste the xml into this section and I cannot use XSLT with it
As background information: the XML is coming pushed from Bitbucket via Cronjob (Release Notes), therefore, when the attachment gets updated, the "content" will automatically adapt. Therefore, I cannot/wantnot use the "code-snippet".
The Release Notes are for technicians, therfore we want to show it to them not as xml but with a bit make-up and glitter for easier understanding, therfore we want to use XSLT as "make-up"
{quote}
As for iframe, it needs to be a full URL if your file is outside of Confluence.
{quote}
This is why I attached the file into the page, to have it inside Confluence.
But what is the correct URL in the iframe to have a view-only of an attachment of the same page resp. the url to be used from the same page?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not familiar with Bitbucket or Cronjob but, basically, you need a URL that, when upon clicking, displays the file.
You can also try using smart links... https://support.atlassian.com/confluence-cloud/docs/insert-links-and-anchors/
I can only urge you to experiment, it took me about an hour of focused experiments to figure out google drive vids and another hour to embed google slides slideshows.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Don't worry about Bitbucket and this stuff, no need :)
I tried the smart-links but this gets me a "cannot preview"
The "funny thing" is that it does not show the xml only but the whole page
I am trying since ~2-3 hours now, this is why I added this question to the community :)
But maybe Atlassian just forbids and does not support that because they want to sell more plugins to make more money. Wouldn't surprise me.
We work with Confluence and JIRA for more than 12 years now. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.