<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>30012</bug_id>
          
          <creation_ts>2016-11-17 16:59:22 +0000</creation_ts>
          <short_desc>[xslt30] Syntax highlighting</short_desc>
          <delta_ts>2016-11-18 18:27:35 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XSLT 3.0</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          <cc>pgfearo</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>128202</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-11-17 16:59:22 +0000</bug_when>
    <thetext>Comments from Phil Fearon:

I’ve just had a quick look at your sample. I like the new style.

A couple of things I noticed which I imagine you’re already aware of,  I also encountered these minor problems:

1. The jsp samples (jsp:setProperty) are corrupted by the XSLT rendering, they should instead use the qf:show-xquery(.) function - which treats the jsp more sympathetically as an XQuery element constructor. This is illustrated in the highlight-inline.xsl changes.
2. The json snippets should also be rendered using qf:show-xquery(.) - they’re treated as map constructors.
2. Syntax definitions containing ‘::=‘ are problematic and should probably be skipped by the highlighter
3. The XML Schema included in H.1 line-wraps which affects formatting - you could use XMLSpectrum’s ‘auto-trim=yes’ and ‘indent=2’ xsl parameters to reformat this to take up less space, even if you don’t need the syntax-highlighting here, XMLSpectrum’s formatting is described here: https://github.com/pgfearo/xmlspectrum/wiki/XSLT-Formatting


Phil</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128203</commentid>
    <comment_count>1</comment_count>
    <who name="Phil Fearon">pgfearo</who>
    <bug_when>2016-11-17 17:31:19 +0000</bug_when>
    <thetext>An addition to the descripton: 

XPath/XQeury expressions included as stand-alone samples should also be processed using qf:show-xquery().

A general rule for syntax-highlighting code content with XMLSpectrum is that, when ignoring whitespace, if the first character is a &apos;&lt;&apos; use f:render(), otherwise use qf:show-xquery().

The exception to this rule is code starting with &apos;&lt;jsp:setProperty&apos;. This code should not be parsed as XML (it nests elements within string-literals) so qf:show-xquery() should be used instead.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128219</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-11-18 17:05:56 +0000</bug_when>
    <thetext>Thanks. I have dealt with points 1, 2, and 2bis pragmatically - they affected very few examples.

Point 3 was more problematic. I played with the idea of displaying the schema in the fixed-width space available using a smaller font, but controlling &lt;pre&gt; output seems to be very browser-dependent. In the end I resorted to writing a custom stylesheet to reformat the schema to a shorter line-length - the final stage of reformatting long attribute values being done by hand.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>