Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - one attribute has a string in xml format [Thread Next] Re: one attribute has a string in xml formatTo: NULL Date: 6/1/2005 1:13:00 PM juergen wrote: > My xml file look like: > > <Sequences> > <Comment text="This is a test comment!" id="<CallingSeq name="Sequence 01" This isn't XML. In XML attributes cannot contain character <, it must be escaped as < > The attribute "id" is a xml string, from which I need a few infos > "descriptions" in my html document. The document should be created by xslt an > I can't used the string functions from xslt (more than two "desc" in the > string could be founded). > Is it possible to translate the attribute string in a node structure? It's really hard to create such weird document with XSLT. Even disable-output-escaping won't help creating < charcter in attribute. The only solution is to emulate XML: <xsl:text disable-output-escaping="yes"><Comment text="This is a test comment!" id="</xsl:text> <CallingSeq name="Sequence 01" path="TestProject-01/Sequence Folder 01" guid="d49f2b33-ab40-486a-898a-4fc8a179bb75" desc="test seq 01" label="SeqV1" version="1" /><Step name="Comment step 01" path="TestProject-01/Step Folder 01" guid="0ec07b91-8c03-47d0-8b2e-b9c0c4e9ef20" desc="comment 01" label="StepV1" version="1" /> <xsl:text>" /></xsl:text> And beware again - the result isn't XML. -- Oleg Tkachenko [XML MVP, MCAD] http://blog.tkachenko.com | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
