Filter by products, topics, and types of content

(0 Products)

(90 Topics)

(10 Industries)

(6 Types)

1 - 42 of 42 results
Show Summaries | Hide Summaries
View Results
Title none Type none Date none
Tip: Call JavaScript from an XSLT style sheet
XSLT style sheets allow you a great deal of freedom in manipulating the data in your original XML document. There are times, however, when you really want to do actual programming, and the XSLT recommendation is designed to allow that through the use of extensions. These extensions take the form of functions and elements and can be written in any language the processor supports. One of your options is to embed JavaScript within the style sheet, either directly or as an external file.
Also available in: Japanese  
Articles 01 Apr 2002
Tip: Apply profile links to microformats
Microformats are a popular way to incorporate structured data into regular Web pages. Unfortunately, using microformats without some measure of control can lead to confusion and technical problems. Learn how formal profile declarations in your documents can improve the value of your microformats.
Articles 26 Jun 2007
Tip: Debug stylesheets with xsl:message
In this tip, discover several possible ways you can use the xsl:message element to assist with understanding and debugging Extensible Stylesheet Language Transformation (XSLT) stylesheets.
Also available in: Chinese  
Articles 18 Jul 2006
Tip: Outputting HTML from an XSL style sheet
This tip discusses the differences between HTML and XML, and explains how to use XSLT's output element to resolve the issues they create.
Also available in: Japanese  
Articles 01 May 2002
Tip: Always use an XML declaration
The XML declaration is optional in XML files, and defaults determine most of the information in the file. However, problems are common when these defaults do not match reality -- for example, the document could use an encoding other than one of the defaults. It's always safer to make the XML declaration. In this tip, Uche Ogbuji covers what should be included in the XML declaration on all files.
Also available in: Russian  
Articles 05 Jun 2007
Tip: Namespaces and versioning
You can use several techniques for versioning XML schemas, such as defining special root attributes or using the DTD. This tip discusses how to use XML namespaces to version formats.
Articles 01 Jun 2002
Tip: Validation and the SAX ErrorHandler interface
In this tip, Brett McLaughlin explores SAX's validation capabilities and explains how to turn XML document validation on and off. He also covers the ErrorHandler interface, which enables you to receive notification of errors in your applications and act on that notification. Code samples demonstrate how to request validation and how to create and register an error handler in SAX.
Articles 01 Jun 2001
Tip: Using an entity resolver
Brett McLaughlin discusses how to use external entity references to include external content in an XML document, and how to use the SAX EntityResolver interface. Code samples illustrate the interface, document its use, and demonstrate how to register the entity resolver in your parser.
Also available in: Japanese  
Articles 01 Jun 2001
Tip: Use internal references in XML vocabularies
In some cases, you can avoid repeating identical data fields by using internal references from one field to another. Uche Ogbuji demonstrates how in this tip.
Also available in: Japanese  
Articles 01 Mar 2003
Tip: Use imports and includes to override XSLT templates
Extensible Stylesheet Language Transformations (XSLT) provide two ways to combine several style sheets in the transformation of a single source document. Which template is actually applied depends on whether and how the template has been included in the main style sheet.
Articles 01 Nov 2002
Tip: Passing files to a Web service
In this tip, Benoit discusses the different solutions available for passing binary data (typically files) to a Web service.
Also available in: Russian   Japanese  
Articles 13 Feb 2004
Tip: Command-line XML processing
Most of the time, processing XML documents utilizes heavy-duty APIs and custom applications. However, the tradition of using small tools with I/O piped between them works fine on Unix-like platforms. Here, David shows you how you can use XML for this kind of quick-and-dirty processing with one-liners that are especially useful during development and debugging cycles.
Also available in: Japanese  
Articles 07 May 2003
Tip: Use XML directly over HTTP for Web services (where appropriate)
SOAP technologies usually exchange XML over HTTP, but SOAP has its pros and cons, and a lot of discussion has focused on how to use XML more directly to communicate between applications. This tip describes the direct approach, and discusses where it is most appropriate. It also discusses how to use WSDL to describe such services.
Articles 15 Jan 2004
Tip: Make SOAP and Web servers cohabit peacefully
SOAP's strength is that it builds on the familiar and widely deployed Web infrastructure. That can also be a weakness because Web servers can make assumptions about Web services that are simply not true. In this installment, Benoit discusses some issues with error handling in Web services.
Also available in: Japanese  
Articles 19 Feb 2004
Tip: Control white space in an XSLT style sheet
This tip shows you how to control the production of white space in a transformation's result, which can lead to documents that more closely align with your requirements.
Also available in: Japanese  
Articles 01 Nov 2002
Tip: SOAP 1.2 and the GET request
SOAP 1.2 brings changes that help to weave Web services more into the fabric of the Internet. One of these changes is the introduction of the GET method. GET is important because it enables various optimizations. This has been demonstrated by the Web itself, which uses GET extensively. Find out more in this tip.
Also available in: Russian   Japanese  
Articles 04 Mar 2004
Tip: Use rdf:about and rdf:ID effectively in RDF/XML
The combination of RDF and XML allows for several different approaches to specifying resources, and sometimes the rules for interpreting the syntax can be troublesome. In this tip, Uche Ogbuji uses examples to illustrate the various behaviors of the rdf:ID and rdf:about attributes, and shows how to use XML Base to control these behaviors.
Also available in: Japanese  
Articles 01 Feb 2003
Tip: Referencing XML schemas
Start using XML Schema to constrain XML documents. This brief tip tells how to reference an XML schema from your XML documents. Five pieces of sample code show how.
Also available in: Russian   Japanese  
Articles 01 Aug 2001
Tip: Using SAX InputSource effectively
This tip explains how using an InputStream to feed XML to the SAX API is significantly more efficient and safer than using a Reader as input. It also briefly touches on the impact of such a choice on internationalization.
Also available in: Japanese  
Articles 01 Aug 2002
Tip: Output large XML documents, Part 1
This tip details the problems associated with outputting large XML documents, starting with an examination of the options for XML output. It then looks at DOM and XML output, along with possible solutions to the memory consumption associated with extended DOM usage. You'll get an understanding of why outputting XML is so tricky, and a solid grasp of the output alternatives that are available.
Also available in: Japanese  
Articles 26 Mar 2003
Tip: Include external information with general entities
General entities enable XML authors to conveniently include not only characters that would be difficult to represent directly, but also information that must be repeated. They also enable you to import information from another file, as well as from another location. This tip shows you how to include external information through the use of general entities.
Articles 01 Jul 2002
Tip: Implement implicit and explicit SOAP headers
You can define SOAP headers in a WSDL definition using what are commonly called explicit and implicit headers. Learn the difference between these two styles and how these differences might impact you when developing with JAX-RPC.
Also available in: Japanese  
Articles 15 Feb 2005
Tip: Create multiple files in XSLT 2.0
For any reasonably complex data set, you need multiple views to navigate it. Take a QA test system, for example: With a pool of tests and test results, you need to see the data by date, by test category, by individual test, and so on. Each view would be in its own HTML file. So, can you have a single template in XSLT 2.0 build multiple HTML files from the one input data set?
Also available in: Japanese  
Articles 18 Mar 2005
Tip: How not to design an XML format
This tip investigates an XML format that demonstrates a number of common mistakes and design flaws, and explains how you can correct these issues and improve the format.
Articles 04 Nov 2005
Web services tip: Use polymorphism as an alternative to xsd:choice
xsd:choice is not always the most optimal XML schema construct. For instance, a type containing xsd:choice does not map to a user-friendly Java class using a JAX-RPC code generator. In this article, you learn about a functional equivalent to xsd:choice: polymorphism.
Articles 20 Sep 2005
Tip: Parsing XML documents partially with StAX
The Streaming API for XML (StAX) provides not only an XML parser that is fast, easy to use, and has a low memory footprint, but one that also provides a filter interface that allows programmers to hide unnecessary document detail from the application's business logic. This tip shows how to apply event filters and stream filters to StAX parsers. As with the first tip, I will demonstrate and explain this using both the iterator-style API and the cursor-based API.
Articles 02 Dec 2003
Tip: Loop with recursion in XSLT
XSLT is a functional programming language like Haskell or Scheme, and unlike C or Fortran. Thus it has no loops and no mutable variables. Instead, you must replace these constructs with recursion and parameters. This tip demonstrates how to provide this functionality using named templates and the xsl:call-template, xsl:with-param, and xsl:param elements.
Also available in: Japanese  
Articles 28 Jul 2006
Tip: Tell a parser where to find a schema
This tip shows you how to implement robust document validation with XML schema and JAXP 1.2. Examples are included for SAX and DOM parsers.
Also available in: Japanese  
Articles 22 May 2003
Tip: Make choices at runtime with XSLT parameters
This tip takes a basic look at using parameters and conditional statements in an XSLT style sheet.
Also available in: Japanese  
Articles 01 Aug 2002
Tip: Computing word count in XML documents
XML is text and yet more than just text -- sometimes you want to work with just the content rather than the tags and other markup. In this tip, Uche Ogbuji demonstrates simple techniques for counting the words in XML content using XSLT with or without additional tools.
Articles 29 Sep 2005
Tip: Use XSL-FO for page breaks and tables
The XSL Formatting Objects (XSL-FO) standard offers powerful properties for controlling the layout of printed documents. This tip shows you how to control the insertion of page breaks for better-looking documents. I'll present a standard method that works with commercial XSL-FO renderers, and a workaround so you can apply the same technique with the open source FOP.
Also available in: Japanese  
Articles 11 Jun 2003
Tip: How to combine documents with XSLT
This tip explains how to write XSLT style sheets that process several documents. This is useful, among other things, for combining book chapters, merging a letter template and a list of addresses, creating tables of content that span several files, or -- following the tip example -- reusing photo descriptions in different galleries.
Also available in: Japanese  
Articles 29 May 2003
Tip: Send and receive SOAP messages with JAX-RPC
In this tip, IBM developer Russell Butek takes a look at JAX-RPC, a Java API that allows an application to communicate with a Web service without knowing details about the SOAP messaging protocol.
Also available in: Japanese  
Articles 02 Sep 2003
Web services tip: Representations of null in XML Schema
Represent a null value in the XML-equivalent of a field when you map a null Java bean field to XML. This tip explores and compares a number of ways to do so.
Also available in: Russian   Japanese  
Articles 09 Aug 2005
Tip: Convert attributes with XSLT
Templates are useful for breaking stylesheets into small, manageable units. Another benefit of templates is that the processor selects the most appropriate one automatically, based on the matching condition. Most templates match on elements, but as Benoit Marchal demonstrates in this tip, a template can match on attributes as well.
Also available in: Russian  
Articles 09 Oct 2003
Tip: Implement XMLReader
In this tip, Benoit Marchal explores APIs for XML pipelines. He concludes that the familiar XMLReader interface is appropriate for many XML components.
Articles 13 Nov 2003
Tip: Better SOAP interfaces with header elements
In this tip, Benoit Marchal discusses how to design modular, flexible, and extensible service interfaces with SOAP headers.
Articles 29 Oct 2003
Tip: Generating internal HTML links with XSLT
Uche Ogbuji walks you through how to use XSLT to populate HTML or XHTML output with anchors and internal links. Internal links help to organize long HTML content; XSLT provides facilities for generating those internal links, but some of the methods are somewhat obscure. This tip, with reusable sample code, clearly spells out two approaches for the process.
Also available in: Japanese  
Articles 01 Feb 2001
Tip: Convert Excel data to XML
Believe it or not, not every document is originally written in XML. In this tip, Benoit Marchal explains how to unlock data from Excel files to process them in XML, and examines the pros and cons of different solutions.
Articles 05 Nov 2003
Tip: Transforming XHTML using XSLT identity templates
XHTML isn't just well-formed HTML: Certain tags must be properly closed. Improperly closed tags are valid XML, but browsers might incorrectly parse them, causing problems with dynamic Web 2.0 features. Whether transforming XML to XHTML or just filtering XHTML, discover the XSLT templates you need to create correct XHTML that follows W3C-recommended practices for XHTML.
Also available in: Chinese   Japanese  
Articles 21 Dec 2010
Tip: Use a SAX filter to manipulate data
This tip explains how to create and use a SAX filter to control how data is processed.
Articles 01 Oct 2002
Tip: Stop a SAX parser when you have enough data
A SAX parser can be instructed to stop midway through a document without losing the data already collected. This is one of the most commonly mentioned advantages of a SAX parser over a DOM parser, which generally creates an in-memory structure of the entire document. In this tip, you'll parse a list of recently updated weblogs, stopping when you've displayed all those within a particular time range.
Also available in: Japanese  
Articles 01 Jun 2002
1 - 42 of 42 results
Show Summaries | Hide Summaries