Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Adding an entity reference

From: Martin Honnen <mahotrash@-----.-->
To: NULL
Date: 9/6/2007 2:48:00 PM

PB wrote:

>> Creating and using entities and entity references in the result of an
>> XSLT 1.0 transformation can not be ensured however unless you use
>> processor specific extensions.

> Can you please show me how to do this?

Whether it is possible at all depends on the XSLT processor you use, for 
instance for Saxon there is an extension element described here:
<http://www.saxonica.com/documentation/extensions/instructions/entity-ref.html>
You would use that as follows
<xsl:stylesheet
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   version="2.0"
   xmlns:sx="http://saxon.sf.net/"
   extension-element-prefixes="sx">

   <xsl:output
     method="xml"
     doctype-system="test2007090601.dtd"/>

   <xsl:template match="/">
     <test><sx:entity-ref name="foo"/></test>
   </xsl:template>


</xsl:stylesheet>

where obviously you would need to make sure that test2007090601.dtd 
defines an entity named foo.

I don't think that Microsoft's XSLT processors like MSXML or 
XslCompiledTransform offer such a feature.

--

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent