|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
well-formed parsed entity as input to XSLT or XQuery?In the .NET world I have no problems to use the Saxon API and a DocumentBuilder that builds an XdmNode from what the XML specification calls a well-formed parsed entity (http://www.w3.org/TR/xml/#wf-entities) and what the Microsoft XmlReader API call a Fragment. The code looks as follows: Processor proc = new Processor(); DocumentBuilder db = proc.NewDocumentBuilder(); XmlReaderSettings xrs = new XmlReaderSettings(); xrs.ConformanceLevel = ConformanceLevel.Fragment; XdmNode input; using (XmlReader xr = XmlReader.Create(@"input.xml", xrs)) { input = db.Build(xr); xr.Close(); } Is the same possible with Saxon Java APIs? How would the Java code look? -- Martin Honnen http://msmvps.com/blogs/martin_honnen/ ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@... https://lists.sourceforge.net/lists/listinfo/saxon-help |
|
|
Re: well-formed parsed entity as input to XSLT or XQuery?I'm not aware of any XML parser in the Java world that will accept a
well-balanced fragment as input. If there were such a parser, and it offered a SAX interface, I suspect it would work perfectly well with Saxon. Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay > -----Original Message----- > From: Martin Honnen [mailto:Martin.Honnen@...] > Sent: 05 November 2009 18:34 > To: Mailing list for the SAXON XSLT and XQuery processor > Subject: [saxon] well-formed parsed entity as input to XSLT or XQuery? > > > In the .NET world I have no problems to use the Saxon API and > a DocumentBuilder that builds an XdmNode from what the XML > specification calls a well-formed parsed entity > (http://www.w3.org/TR/xml/#wf-entities) and what the > Microsoft XmlReader API call a Fragment. The code looks as follows: > > Processor proc = new Processor(); > DocumentBuilder db = proc.NewDocumentBuilder(); > > XmlReaderSettings xrs = new XmlReaderSettings(); > xrs.ConformanceLevel = ConformanceLevel.Fragment; > > XdmNode input; > using (XmlReader xr = > XmlReader.Create(@"input.xml", xrs)) > { > input = db.Build(xr); > xr.Close(); > } > > Is the same possible with Saxon Java APIs? How would the Java > code look? > > -- > > Martin Honnen > http://msmvps.com/blogs/martin_honnen/ > > -------------------------------------------------------------- > ---------------- > Let Crystal Reports handle the reporting - Free Crystal > Reports 2008 30-Day trial. Simplify your report design, > integration and deployment - and focus on what you do best, > core application coding. Discover what's new with Crystal > Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > saxon-help mailing list archived at > http://saxon.markmail.org/ saxon-help@... > https://lists.sourceforge.net/lists/listinfo/saxon-help ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@... https://lists.sourceforge.net/lists/listinfo/saxon-help |
| Free embeddable forum powered by Nabble | Forum Help |