News

Internet - .Net user group technical events, emerging .Net technologies;
General - Eco-travel, health and fitness, current events;
Community - Active volunteer with Hands On Miami, Non-Profit Ways;
.Net Framework - Detected 3.5 SP1 .NET Framework. No update needed ;
creative zen converter

Tweets













Document (doc.xml)

Is it possible to insert elements into the stream being parsed by an xml.sax parser while it's parsing?  I would like to be able to merge bits of xml into a document while it's being parsed.  Merging is triggered by an element I'm calling 'include-xml' that indicates the location of an external xml document.  Presently, I'm using what's  essentially an identity transformation with xslt to produce a document
 derived from multiple sources (all same namespace; no additional transformations necessary), and then parsing that document.


<?xml version="1.0"?>

<root>
  <myns:transform-and-include src="otherdoc.xml" xsl="transfo.xslt"/>
</root>

--- Other document (otherdoc.xml)

<?xml version="1.0"?>

<name>mai</name>

--- transform (transfo.xslt)

...

<xsl:template match="name">

<firstname><xsl:value-of select="."/></firstname>

</xsl:template>

...

--- Result

Would be cool if reading in doc.xml would be equivalent to reading in

<?xml version="1.0"?>

<root>
  <firstname>mai</firstname>
</root>

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
Friday, June 02, 2006 2:42 PM

Feedback

No comments posted yet.


Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: