Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Adding an entity reference [Thread Next] Re: Adding an entity referenceTo: 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/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
