Thread View: adobe.framemaker.sgml
9 messages
9 total messages
Started by Michael_Deslongchamps
Tue, 17 Feb 2009 21:54
Problem with Entities and and XSL
Author: Michael_Deslongchamps
Date: Tue, 17 Feb 2009 21:54
Date: Tue, 17 Feb 2009 21:54
1 lines
642 bytes
642 bytes
When working with images Framemaker generates the following when exporting to XML.
Re: Problem with Entities and and XSL
Author: Ian_Proudfoot
Date: Tue, 17 Feb 2009 22:54
Date: Tue, 17 Feb 2009 22:54
19 lines
1369 bytes
1369 bytes
Hi Michael,
It's not clear if you are using the XSLT as part of the FrameMaker import/export process, to generate HTML, or some other process. However, the answer is the same in each case...
Use the xpath function unparsed-entity-uri() to return the URI of the referenced graphic file.
This could be used within your XSLT as follows when the context node is the symbol element: <xsl:value-of select="unparsed-entity-uri(@boardno)"/>.
Just use the result to populate the relevant attribute in the output document for example in HTML:
<img href="{unparsed-entity-uri(@boardno)}">
I hope this what you were looking for.
Best regards
Ian
Ian Proudfoot
iTP-X
Adobe Community Expert
Re: Problem with Entities and and XSL
Author: Michael_Mueller-Hillebrand
Date: Wed, 18 Feb 2009 10:31
Date: Wed, 18 Feb 2009 10:31
14 lines
1194 bytes
1194 bytes
Another option would be to not use the entity mechanics at all for XML output. You can achieve that by removing the entity attribute from the external DTD and the following read/write rules (among others):
element "image"
{
is fm graphic element;
attribute "entity" drop;
attribute "href" is fm property file;
}
This would give you something like
<image href="some file path" ... />
- Michael
Re: Problem with Entities and and XSL
Author: Martti_Poutanen
Date: Wed, 18 Feb 2009 11:17
Date: Wed, 18 Feb 2009 11:17
7 lines
838 bytes
838 bytes
Michael, The dtd change could be politically difficult in this case. The sample looks like airplane stuff, where the boardno is an entity type attribute, old remnant from the old ATA dtd. Ian's solution definitely works (using the same..) Martti
Re: Problem with Entities and and XSL
Author: Michael_Deslongchamps
Date: Wed, 18 Feb 2009 14:48
Date: Wed, 18 Feb 2009 14:48
1 lines
840 bytes
840 bytes
Thank you for help! That works great for the final result but I am getting an error on xml export... The values for boardno must be names or name tokens...any help on how to fix that and what that means would be great! Thanks again for all your help.
Re: Problem with Entities and and XSL
Author: Martti_Poutanen
Date: Wed, 18 Feb 2009 19:47
Date: Wed, 18 Feb 2009 19:47
7 lines
841 bytes
841 bytes
Hi Michael, Name token does not allow digits..I'd say that the problem is caused by the space in the graphics path that gets converted to %20. If you cannot change the dtd, get rid of the space in the path. BR, Martti
Re: Problem with Entities and and XSL
Author: Michael_Deslongchamps
Date: Thu, 19 Feb 2009 13:35
Date: Thu, 19 Feb 2009 13:35
1 lines
674 bytes
674 bytes
Thank you very much. I would never have guessed that!
Re: Problem with Entities and and XSL
Author: Michael_Deslongchamps
Date: Tue, 17 Mar 2009 15:26
Date: Tue, 17 Mar 2009 15:26
12 lines
994 bytes
994 bytes
I cannot get the img src to take the entity value...
this is the structure i am using...
<xsl:template match="symbol">
<xsl:element name="IMG">
<xsl:attribute name="SRC"><xsl:value-of select="unparsed-entity-uri(@boardno)"/></xsl:attribute>
<xsl:attribute name="ALIGN">middle</xsl:attribute>
</xsl:element>
</xsl:template>
the result is img src="" align=middle
Re: Problem with Entities and and XSL
Author: Martti_Poutanen
Date: Wed, 18 Mar 2009 07:31
Date: Wed, 18 Mar 2009 07:31
9 lines
1052 bytes
1052 bytes
Hi Michael, your xsl looks correct and should work (I've used the same with frame generated XML files but not with build-in XSLT). Change the xsl to write the value of boardno to src attribute to see what value is returned. The only reason if could come up is that the local entity declarations are vanished when the XML is passed to XSLT. Another try is to use, for example, saxon outside of frame env. to check that you get the unparsed value BR, Martti
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads