Re: [xsl] Are there things missing in XSLT which force people to use, say, Java to process XML?
2010-10-29 08:05:39
Roger,
I was just thinking that the current XSLT standard lacks interactivity,
and was about to suggest an element xsl:prompt for further revisions of
the standard.
Scenario: A stylesheet that converts a .docx (or OpenOffice, or IDML,
...) file to XHTML and discovers ordinary paragraphs that look like
headings: all large font and boldface. A person should be able to
interactively correct the markup. The stylesheet should be able to
prompt this person:
<xsl:template match="para[my:looks-like-heading(.)]"
mode="correct-structure">
<xsl:prompt bind-variable="user-choice" as="xs:string">
Found heading candidate: <xsl:value-of select="." />
I suggest that I convert it to a heading. What should I do? [k]eep as
is, make it h[1], h[2], h[3], h[4], h[5], h[6], put it in custom markup
(specify as 'element(_at_)attribute=value', e.g., p(_at_)class=check-later)
</xsl:prompt>
<xsl:choose>
<xsl:when test="$user-choice eq 'k'>
<xsl:copy-of select="." />
<xsl/when>
<xsl:when test="matches($user-choice, '[1-6]')">
<xsl:element name="h{$user-choice}">
<xsl:apply-template mode="#current" />
</xsl:element>
</xsl:when>
<xsl:when test="matches($user-choice,
'^([-_:\w]+)(@([-_:\w])=(.*))?$')">
<xsl:analyze-string ....>
...
/
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="." />
<xsl/otherwise>
</xsl:choose>
</xsl:template>
I think you can somehow make XSLT interactive in a Java application that
invokes an XSLT processor. For example, oXygen is a Java application
that acts as an XSLT debugger, allowing breakpoints, among other things.
If you can manipulate variables at a breakpoint (not sure whether oXygen
permits this), then you have a facility such as xsl:prompt in a combined
Java/XSLT application.
The lack of xsl:prompt did'nt make me develop custom Java applications
around my XSLT, but from time to time I wish there were such interactive
facilities in pure XSLT.
-Gerrit
On 29.10.2010 14:28, Costello, Roger L. wrote:
Hi Folks,
Many developers use Java to process XML documents.
Why?
Are there things missing in XSLT which force them to use Java? What things?
/Roger
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--
Gerrit Imsieke
Geschäftsführer / Managing Director
le-tex publishing services GmbH
Weissenfelser Str. 84, 04229 Leipzig, Germany
Phone +49 341 355356 110, Fax +49 341 355356 510
gerrit(_dot_)imsieke(_at_)le-tex(_dot_)de, http://www.le-tex.de
Registergericht / Commercial Register: Amtsgericht Leipzig
Registernummer / Registration Number: HRB 24930
Geschäftsführer: Gerrit Imsieke, Svea Jelonek,
Thomas Schmidt, Dr. Reinhard Vöckler
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [xsl] Are there things missing in XSLT which force people to use, say, Java to process XML?, Costello, Roger L.
- Re: [xsl] Are there things missing in XSLT which force people to use, say, Java to process XML?, jeroen
- Re: [xsl] Are there things missing in XSLT which force people to use, say, Java to process XML?,
Imsieke, Gerrit, le-tex <=
- Re: [xsl] Are there things missing in XSLT which force people to use, say, Java to process XML?, Imsieke, Gerrit, le-tex
Re: [xsl] Are there things missing in XSLT which force people to use, say, Java to process XML?, Christopher R. Maden
[xsl] RE: Are there things missing in XSLT which force people to use, say, Java to process XML?, Costello, Roger L.
|
Previous by Date: |
Re: [xsl] Are there things missing in XSLT which force people to use, say, Java to process XML?, jeroen |
Next by Date: |
Re: [xsl] ID Generation for XML Element, Tom Browder |
Previous by Thread: |
Re: [xsl] Are there things missing in XSLT which force people to use, say, Java to process XML?, jeroen |
Next by Thread: |
Re: [xsl] Are there things missing in XSLT which force people to use, say, Java to process XML?, Dimitre Novatchev |
Indexes: |
[Date]
[Thread]
[Top]
[All Lists] |
|
|