Eclipse: Sync XSLT-Input and Attributes
Are you missing a feature? Request its implementation here.
Eclipse: Sync XSLT-Input and Attributes
I like to use the XSLT-Input View in order to get an overview of the originating XML file I am writing a transformer for.
However, by times, it might be interesting to have a full view on the attributes and values of a node I inspect in the XSLT-Input view. The way to do it now is to change the editor to the XML source's and navigate in this.
This could be much easier (and quicker) if there'd be a way to get all the information of the source XML via an Attributes View, that is connected to the XSLT-Input. One could have two Attribute Views open, one for the editor in use, the other one locked to the XSLT-Input View. Thanks.
However, by times, it might be interesting to have a full view on the attributes and values of a node I inspect in the XSLT-Input view. The way to do it now is to change the editor to the XML source's and navigate in this.
This could be much easier (and quicker) if there'd be a way to get all the information of the source XML via an Attributes View, that is connected to the XSLT-Input. One could have two Attribute Views open, one for the editor in use, the other one locked to the XSLT-Input View. Thanks.
Andreas
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Eclipse: Sync XSLT-Input and Attributes
Post by sorin_ristache »
Hello,
Regards,
Sorin
Why do you have to switch to the XML editor ? The XSLT Input view displays the full structure of the XML source while editing the XSLT stylesheet: all possible element names with their location in the XML source represented as the path in the tree and all possible attributes of each element name.amix wrote:it might be interesting to have a full view on the attributes and values of a node I inspect in the XSLT-Input view. The way to do it now is to change the editor to the XML source's and navigate in this.
Doesn't the XSLT Input view contain all the information about the structure of the source XML ? Please can you give more details about what would you need to be added about the XML source of the transformation to what the XSLT Input already provides and how would you use that when editing an XSLT stylesheet ?amix wrote:This could be much easier (and quicker) if there'd be a way to get all the information of the source XML via an Attributes View that is connected to the XSLT-Input.
The contents of the second one would duplicate the attributes presented in the XSLT Input view.amix wrote:One could have two Attribute Views open, one for the editor in use, the other one locked to the XSLT-Input View. Thanks.
Regards,
Sorin
Re: Eclipse: Sync XSLT-Input and Attributes
Yes, the attribute and element names. But not their values. Sometimes I can not create a template, that fits all. Sometimes the way, I need to handle the XSLT is dependant on the value of the attribute. Have a look at this (this is from my work on transforming OpenDocument into XHTML+CSS)sorin wrote:Hello,
Why do you have to switch to the XML editor ? [...] and all possible attributes of each element name.amix wrote:it might be interesting to have a full view on the attributes and values of a node I inspect in the XSLT-Input view. The way to do it now is to change the editor to the XML source's and navigate in this.
Code: Select all
<xsl:template match="style:style[@style:name='Text_20_body']">
<xsl:text>.</xsl:text><xsl:value-of select="@style:name"/> <xsl:text> { </xsl:text>
<xsl:if test="style:paragraph-properties">
<xsl:call-template name="css-processor"/>
</xsl:if>
<xsl:text>}</xsl:text>
</xsl:template>
<xsl:template match="style:style[@style:name='Quotations']">
<xsl:text>.</xsl:text><xsl:value-of select="@style:name"/> <xsl:text> { </xsl:text>
<xsl:if test="style:paragraph-properties">
<xsl:call-template name="css-processor"/>
</xsl:if>
<xsl:text>}</xsl:text>
</xsl:template>
Code: Select all
<xsl:template match="style:style>
Code: Select all
<xsl:template match="style:style[@style:name='Quotations']">
Code: Select all
<xsl:template match="style:style[@style:name='Illustration']">
<xsl:text>span.</xsl:text><xsl:value-of select="@style:name"/> <xsl:text> { </xsl:text>
<xsl:if test="style:paragraph-properties">
<xsl:call-template name="css-processor"/>
</xsl:if>
<xsl:text>}</xsl:text>
</xsl:template>
<xsl:template match="style:style[@style:name='Emphasis']">
<xsl:text>span.</xsl:text><xsl:value-of select="@style:name"/> <xsl:text> { </xsl:text>
<xsl:if test="style:text-properties">
<xsl:call-template name="css-processor"/>
</xsl:if>
<xsl:text>}</xsl:text>
</xsl:template>
A generic template-match for 'A' can be either a <p> or a <span> in the CSS, it really depends on the style:name="" attribute value. This is the point. And there is maybe 25-40 such templates, which I can reduce to a few by using intelligent pattern-matching, but I will never be able to create one template, that fits all. I need to fine tune it, since HTML+CSS is different from the ODF styles.
And this is the moment in which I switch forth and back between source and transformer.
Yes, the structure is covered, but not the contents.sorin wrote:Doesn't the XSLT Input view contain all the information about the structure of the source XML ?
The contents of the second one would duplicate the attributes presented in the XSLT Input view.[/quote]amix wrote:One could have two Attribute Views open, one for the editor in use, the other one locked to the XSLT-Input View. Thanks.
I meant views locked to editors. The views display contextually the current editor. If they could be locked (after they have been 'applied'), then I would be able to see the contents of the former while the other editor is active Though, I have found a solution, that solves my problems: It is possible to have both editors open at once, one on the top of screen, the other below it.
I must appologize. When I wrote all my feature-requests it was late-night/early morning and I was exhausted, not focussing enough. I should have realized that the XSLT-Input is a logical representation of all the element-names and attribut-names. It is just perfect the way it is and I would not want to see it changed.
However, I still could live with the possibility to have two Outline views present, with one being locked to a certain editor. This would mean, that it does not change the contents when the other editor gets activated, since that does have its own outline-view.
Please, post what you think. Maybe you even know of a solution to my problem, which is not so much of a problem anyway, but would more be a convenience/comfort feature. I still can align the two editors one above each other, it's just not that comfortable on small screens (I use a pretty high resolution, so I can live with that.)
Andreas
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service