ebeshero / Amadis-in-Translation

a project to apply TEI markup to investigate early modern Spanish editions of Amadis de Gaula and their translations into English and French from the 1500s to the early nineteenth century.
http://amadis.newtfire.org
GNU Affero General Public License v3.0
4 stars 6 forks source link

Unwanted Attributes in XSLT Output #1

Closed ebeshero closed 9 years ago

ebeshero commented 9 years ago

XSLT transformations can generate unwanted attributes on your elements, such as @default="false" or @N="part". These are actually valid in TEI, but meaningless to us and we don't want them. We stop XSLT from generating these attributes by changing an XSLT processing setting on the Saxon parsers we are using:

A short-term fix: In the XSLT debugger view of oXygen, click on the blue gear next to the Saxon version menu to open the "Advanced options" window. Under "Saxon -HE/PE/EE options", uncheck "Expand attributes default ('-expand')"

Remember, when running XSLT on TEI files, we always want to use one of the Saxon parsers, preferably Saxon PE or EE.

ebeshero commented 9 years ago

There's a more permanent way to set this in oXygen (I think)--I need to check this when I am at my computer.

ebeshero commented 9 years ago

Here is the way that has worked for me on my installation of oXygen, to ensure that unwanted attributes are not applied during an XSLT transformation using the Saxon parsers.

  1. In oXygen, go to the Options menu (on the top menu: File, Edit, Find, Project, Options). On the Options dropdown menu, select Preferences.
  2. Under Preferences, find "XML." Click on the triangle icon next to "XML" to open up the nested options within "XML."
  3. From these nested options, open the triangle for "XSLT-FO-XQuery."
  4. From this set of options, choose the triangle for "XSLT" and open it.
  5. Choose Saxon, and do the same thing: open its triangle.
  6. Within Saxon, choose Saxon HE/PE/EE. On the screen to the right, look for "Expand attribute defaults" and remove the checkmark to deselect it. At the bottom of this screen, click Apply, and OK.

For me, this has worked to stop the "attribute defaults" from being applied in all of my XSLT transformations, and I have not needed to change the setting--even with upgrading to a new version of oXygen recently. @HelenaSabel: let me know if this works!

ebeshero commented 9 years ago

By the way, to ping people, try using the @ symbol and start typing one of our names. @setriplette @HelenaSabel

HelenaSabel commented 9 years ago

Thank you so much, @ebeshero, that was exactly what I failed to find!

ebeshero commented 9 years ago

@HelenaSabel Make sure it stays set, after you close and reopen oXygen, and run a new transformation.

HelenaSabel commented 9 years ago

Yes, it does! You've boosted my effectiveness ;)

ebeshero commented 9 years ago

Huzzah! :-)