[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: CDATA block to node set.

Subject: Re: CDATA block to node set.
From: Morten Primdahl <morten@xxxxxxx>
Date: Thu, 09 May 2002 22:31:44 +0200
morten primdahl

I know that my question may seem that of a delusional madman. But I'm well aware of what CDATA is, I had just hoped to access it the same way one can access data from a URL:

<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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.