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

Re: Data Oriented and Document Oriented Defintions


sld examples
Mike Champion <mc@x...> writes:

> - [quoting directly from Prescod] "Data-oriented
> systems tend to prefer object types to be detectable 
> independent of context (thus namespaces) whereas
> document processing is typically done top-down
> recursively so relying on context is natural."

I'm not sure about that one. I found myself using namespaces in STnG
where I could have used context precisely because the documents are
intended to be human-readable (and human-authorable) and I want the
reader to see what he is dealing with. I use a
sort-of-literate-programming style, where fragments of RLAXNG, XSLT
and my own declarations are documented using fragments of XHTML. I
want the reader to be able to know right away which part of the
document he's looking at without having to scroll up or down to find
the context.

Ari.
[full document at http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/stng/STnG/literate/reader.sld?rev=HEAD&content-type=text/vnd.viewcvs-markup]

<sld:stingie>
  <sld:name>st:reader</sld:name>
  <sld:class>reader</sld:class>

  <sld:content-model>
    <rng:element name="st:reader">
      <rng:zeroOrMore>
        <!-- other RNG declarations -->
      </rng:zeroOrMore>
    </rng:element>
  </sld:content-model>

  <sld:effect>
    <h:p>Specifies an XML reader and a way to control its reatures and
    properties.</h:p>
    <!-- more XHTML documentation -->
  </sld:effect>

  <sld:examples>
    <sld:example title="A validating identity transform">
      <sld:stng>
        <sld:block-xml xml:space="preserve">
          <!-- any XML cn go here -->
        </sld:block-xml>
      </sld:stng>

      <h:p>This STnG specifies only a reader, with no filter and a
      defaulted serializer. On the reader, valudation is turned on and
      namespace processing is turned off. You can use this STNG as a
      simple command-line validator. The input document is serialized
      back to standard output. Note that the validator will add and
      attibutes defaulted in the DTD.</h:p>

    </sld:example>
  </sld:examples>

  <sld:implementation>
    <java:class package="org.xml.sax">XMLReader</java:class>
    <java:variable-prefix>xr</java:variable-prefix>

    <sjc:complet>
      <sjc:template>
        <xsl:choose>
          <xsl:when test="@java:class!='org.xml.sax.XMLReader'">
            <!-- Non-default: user specified a class explicitly -->
            <sjc:class/> <sjc:identifier/> = new <sjc:class/> ();
          <!-- more XSLT  -->
      </xsl:template>
    </sjc:complet>

  </sld:implementation>

  <sld:entomology>
    <sld:notTested/>
  </sld:entomology>

</sld:stingie>

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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.