[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: CDATA block to node set.
<xsl:template match="xmlref"> <xsl:variable name="content" select="document(@url)/*"/> <!-- do stuff here --> </xsl:template> I've devised a small compositional query language based on XSLT, purely for academic reasons. It looks like: xslquery := <xmlref url="..."/> | <xmldata> XML </xmldata> | <select>xlsquery<from>xslquery</from></select> The DTD: <!DOCTYPE xslquery [ <!ELEMENT xslquery (select|xmlref|xmldata)> <!ELEMENT select (xslquery, from)> <!ELEMENT from (xslquery)> <!ELEMENT xmldata (#PCDATA)> <!ELEMENT xmlref EMPTY> <!ATTLIST xmlref url CDATA #REQUIRED> ]> I asked because the case where the xmldata holds another xslquery can be possible. Usually the xmldata element holds just source XML, which is why the CDATA approach was chosen, so I could parse the query for well-formedness. But in cases where the content is indeed an xslquery, I would like to be able to process that, compiling it into the target language (eg. Java). I guess my best bet is to 1. Make my xsltql2java.xsl compiler stylesheet namespace aware. 2. Use an XSL Schema with lax parsing on the xmldata element and ditch the DTD. Thanks, Morten XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|