Possible to use embedded stylesheet in Transformation Scenario?
Posted: Mon Feb 08, 2016 8:27 pm
------
This is a "just curious" question inspired by a textbook example, not a real work problem.
The book provides the following XML as an illustration of an embedded stylesheet, id="petstyle":
Is it possible to configure an oXygen 17 Transformation Scenario to use this?
As I said, I'm merely curious. I only today learned how to configure a Transformation Scenario to use a linked stylesheet. Now I'm figuring out how to use an embedded stylesheet should the need arise (highly improbable it ever will, I think)...
Cheers & thanks,
Riley
SFO
This is a "just curious" question inspired by a textbook example, not a real work problem.
The book provides the following XML as an illustration of an embedded stylesheet, id="petstyle":
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xml" href="#petstyle"?>
<!DOCTYPE pets [<!ATTLIST xsl:stylesheet id ID #IMPLIED>]>
<pets>
<pet type="cat">Max</pet>
<pet type="parrot">Peter <color>red</color>
</pet>
<xsl:stylesheet id="petstyle" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="xsl:stylesheet"/>
<xsl:template match="pets"> My pets: <xsl:apply-templates/>
</xsl:template>
<xsl:template match="pet">
<xsl:value-of select="text()"/>
</xsl:template>
</xsl:stylesheet>
</pets>
As I said, I'm merely curious. I only today learned how to configure a Transformation Scenario to use a linked stylesheet. Now I'm figuring out how to use an embedded stylesheet should the need arise (highly improbable it ever will, I think)...
Cheers & thanks,
Riley
SFO